/**
 * WPBakery Images + Text Highlighter Frontend CSS
 */

.enym-images-text-highlighter {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: var(--enym-ith-gap, 30px);
}

.enym-images-text-highlighter *,
.enym-images-text-highlighter *::before,
.enym-images-text-highlighter *::after {
    box-sizing: border-box;
}

/* =========================================================
   Layout Orientations
   ========================================================= */

/* Images Left (Default) */
.enym-images-text-highlighter.enym-ith-orientation-left {
    flex-direction: row;
}

/* Images Right */
.enym-images-text-highlighter.enym-ith-orientation-right {
    flex-direction: row-reverse;
}

/* Images Top */
.enym-images-text-highlighter.enym-ith-orientation-top {
    flex-direction: column;
}

/* Images Bottom */
.enym-images-text-highlighter.enym-ith-orientation-bottom {
    flex-direction: column-reverse;
}

/* Mobile Stacking */
@media (max-width: 768px) {
    .enym-images-text-highlighter.enym-ith-orientation-left,
    .enym-images-text-highlighter.enym-ith-orientation-right {
        flex-direction: column;
    }
}

/* =========================================================
   Columns Configuration
   ========================================================= */
.enym-images-text-highlighter .enym-ith-images-col {
    flex: 1 1 50%;
    display: grid;
    grid-template-columns: repeat(var(--enym-ith-cols, 2), minmax(0, 1fr));
    gap: 16px;
    align-content: start;
}

@media (max-width: 600px) {
    .enym-images-text-highlighter .enym-ith-images-col {
        grid-template-columns: repeat(min(2, var(--enym-ith-cols, 2)), minmax(0, 1fr));
    }
}

.enym-images-text-highlighter .enym-ith-desc-col {
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.enym-images-text-highlighter .enym-ith-desc-list {
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* =========================================================
   Image Cards
   ========================================================= */
.enym-images-text-highlighter .enym-ith-image-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    background-color: var(--enym-ith-img-bg, #f5f6f8);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.3s ease,
                border-color 0.3s ease;
}

.enym-images-text-highlighter .enym-ith-image-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s ease;
}

.enym-images-text-highlighter .enym-ith-image-item .enym-ith-img-placeholder {
    width: 100%;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* Image Number Badge */
.enym-images-text-highlighter .enym-ith-image-item .enym-ith-number {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

/* Image Active Highlight */
.enym-images-text-highlighter .enym-ith-image-item.enym-ith-active {
    background-color: var(--enym-ith-img-hover-bg, #e8f0fe);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.14);
    transform: translateY(-3px) scale(1.02);
    z-index: 3;
}

.enym-images-text-highlighter .enym-ith-image-item.enym-ith-active img {
    transform: scale(1.05);
}

.enym-images-text-highlighter .enym-ith-image-item.enym-ith-active .enym-ith-number {
    background: #2271b1;
    transform: scale(1.1);
}

/* =========================================================
   Description Items
   ========================================================= */
.enym-images-text-highlighter .enym-ith-desc-item {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--enym-ith-separator-color, rgba(0, 0, 0, 0.08));
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.enym-images-text-highlighter .enym-ith-desc-item:last-child {
    border-bottom: none;
}

/* Description Number Badge */
.enym-images-text-highlighter .enym-ith-desc-item .enym-ith-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.06);
    color: #333;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

/* Symbol / Icon */
.enym-images-text-highlighter .enym-ith-symbol {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    margin-top: 4px;
    color: #555;
    transition: color 0.25s ease, transform 0.25s ease;
}

/* Content */
.enym-images-text-highlighter .enym-ith-content {
    flex: 1 1 auto;
}

.enym-images-text-highlighter .enym-ith-title {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    color: #1d2327;
    transition: color 0.25s ease;
}

.enym-images-text-highlighter .enym-ith-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.55;
    color: #50575e;
}

/* Description Item Active Highlight */
.enym-images-text-highlighter .enym-ith-desc-item.enym-ith-active {
    background-color: rgba(34, 113, 177, 0.05);
}

.enym-images-text-highlighter .enym-ith-desc-item.enym-ith-active .enym-ith-number {
    background-color: #2271b1;
    color: #ffffff;
    transform: scale(1.08);
}

.enym-images-text-highlighter .enym-ith-desc-item.enym-ith-active .enym-ith-symbol {
    color: #2271b1;
    transform: scale(1.1);
}

.enym-images-text-highlighter .enym-ith-desc-item.enym-ith-active .enym-ith-title {
    color: #2271b1;
}

/* =========================================================
   Styles Presets
   ========================================================= */

/* Modern (Default) */
.enym-images-text-highlighter.enym-ith-style-modern .enym-ith-image-item {
    border-radius: 12px;
}
.enym-images-text-highlighter.enym-ith-style-modern .enym-ith-desc-item {
    border-radius: 8px;
}
.enym-images-text-highlighter.enym-ith-style-modern .enym-ith-desc-item.enym-ith-active {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* Minimal */
.enym-images-text-highlighter.enym-ith-style-minimal .enym-ith-image-item {
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.enym-images-text-highlighter.enym-ith-style-minimal .enym-ith-image-item.enym-ith-active {
    border-color: #2271b1;
    box-shadow: none;
    transform: none;
}
.enym-images-text-highlighter.enym-ith-style-minimal .enym-ith-desc-item {
    padding: 14px 10px;
}
.enym-images-text-highlighter.enym-ith-style-minimal .enym-ith-desc-item.enym-ith-active {
    background: transparent;
}
.enym-images-text-highlighter.enym-ith-style-minimal .enym-ith-desc-item.enym-ith-active .enym-ith-title {
    color: #2271b1;
}

/* Rounded */
.enym-images-text-highlighter.enym-ith-style-rounded .enym-ith-image-item {
    border-radius: 20px;
}
.enym-images-text-highlighter.enym-ith-style-rounded .enym-ith-desc-item {
    border-radius: 14px;
}
.enym-images-text-highlighter.enym-ith-style-rounded .enym-ith-image-item .enym-ith-number,
.enym-images-text-highlighter.enym-ith-style-rounded .enym-ith-desc-item .enym-ith-number {
    border-radius: 10px;
}

/* Classic */
.enym-images-text-highlighter.enym-ith-style-classic .enym-ith-image-item {
    border-radius: 0;
    border: 1px solid rgba(0, 0, 0, 0.12);
}
.enym-images-text-highlighter.enym-ith-style-classic .enym-ith-image-item.enym-ith-active {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1);
}
.enym-images-text-highlighter.enym-ith-style-classic .enym-ith-desc-item {
    border-radius: 0;
}
.enym-images-text-highlighter.enym-ith-style-classic .enym-ith-image-item .enym-ith-number,
.enym-images-text-highlighter.enym-ith-style-classic .enym-ith-desc-item .enym-ith-number {
    border-radius: 0;
}

/* Unstyled */
.enym-images-text-highlighter.enym-ith-style-unstyled .enym-ith-image-item {
    border-radius: 0;
    box-shadow: none;
    transform: none;
}
