/* Envato Elements Home Section – card style: image + hover video + expand + Envato badge + title + logo */

/* Solo block – no grid, no card chrome (shadow/padding/hover) */
.ees-home-section {
    width: 100%;
    margin: 0;
}

.ees-home-grid {
    display: block;
}

.ees-home-card {
    display: flex;
    flex-direction: column;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.ees-home-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Preview media: image + video on hover (blocksy-hover-video-preview style) */
.ees-home-preview {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f0f0f0;
    margin: 0;
}

.ees-home-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ees-home-media.is-loaded .ees-home-image {
    opacity: 1;
}

.ees-home-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.ees-home-media.is-playing .ees-home-video {
    opacity: 1;
}

.ees-home-media.is-playing .ees-home-image {
    opacity: 0;
}

/* Skeleton loading */
.ees-home-skeleton {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%);
    background-size: 400% 100%;
    animation: ees-home-shimmer 1.4s infinite;
    z-index: 2;
    transition: opacity 0.3s ease;
}

.ees-home-media.is-loaded .ees-home-skeleton {
    opacity: 0;
    pointer-events: none;
}

@keyframes ees-home-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

/* Top-left badge: same as BHVP .preview-category (icon + Envato text + animation) */
.ees-home-section .preview-category {
    position: absolute;
    top: 8px;
    left: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 0, 0, 0.83);
    color: #fff;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    z-index: 7;
    opacity: 0 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-5px);
    font-weight: bold;
    text-transform: uppercase;
}

.ees-home-section .ees-home-media.is-loaded .preview-category,
.ees-home-section .preview-media.is-loaded .preview-category {
    opacity: 1 !important;
    transform: translateX(0);
}

/* Hover animation – same as BHVP category */
.ees-home-section .preview-category:hover {
    background: #fff !important;
    color: #000 !important;
    transform: translateX(4px);
}

.ees-home-section .preview-category img {
    width: 14px !important;
    height: 14px !important;
    transition: transform 0.3s ease;
}

.ees-home-section .preview-category:hover img {
    transform: rotate(20deg);
    filter: invert(1);
}

/* BHVP path: figure may not have aspect-ratio from ees-home-preview; match BHVP preview-media */
.ees-home-figure.ct-image-container.preview-media {
    margin: 0;
}

/* Expand icon – top right */
.ees-home-expand {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.65);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.85);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 7;
    cursor: pointer;
}

.ees-home-expand img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.ees-home-media.is-playing .ees-home-expand {
    opacity: 1;
    transform: scale(1);
}

.ees-home-expand:hover {
    background: #0073ff;
    box-shadow: 0 0 14px rgba(0, 115, 255, 0.4);
}

.ees-home-expand:hover img {
    animation: ees-home-pulse 0.6s infinite alternate;
}

@keyframes ees-home-pulse {
    from { transform: scale(1) rotate(0deg); }
    to { transform: scale(1.15) rotate(5deg); }
}

/* Card content: title + envato logo + text */
.ees-home-content {
    padding: 0;
    padding-top: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Title uses theme-style .entry-title; scope link appearance inside home section */
.ees-home-section .entry-title {
    margin: 0;
}

.ees-home-section .entry-title a {
    color: #111;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.25s ease;
}

.ees-home-section .entry-title a:hover {
    color: #12d349;
}

/* Envato logo rounded + "envato" text (envato-author style) */
.ees-home-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ees-home-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Bottom label – same class as envato-author-hover-card */
.ees-home-section .envato-author-name {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    text-transform: lowercase;
}

/* Modal (expand video) */
.ees-home-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.ees-home-modal-content {
    width: 90%;
    max-width: 900px;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    animation: ees-home-modal-in 0.3s ease-out;
}

@keyframes ees-home-modal-in {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.ees-home-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: background 0.25s ease, transform 0.25s ease;
}

.ees-home-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.ees-home-modal-close img {
    width: 18px;
    height: 18px;
    filter: brightness(0) invert(1);
}

.ees-home-modal-content video {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .ees-home-video,
    .ees-home-expand {
        display: none !important;
    }
}

.ad-manager-between-card .envato-author-name {
	text-transform: none;
	color: var(--theme-text-color, #3a4f66);
	font-size: 12px;
	font-weight: 600;
	line-height: 1.3;
}
.ad-manager-between-card .meta-author .envato-author-wrap {
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
}
