/*
 * Speaker Full Template - Flip Card Style
 * Displays speaker image with name/tagline that flips to show gallery text on hover
 */

/* Force override any theme styles */
.image-carousel-container[data-template="speaker_full"] {
    display: block !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    scroll-behavior: smooth;
    padding: 20px 10px;
    width: 100%;
    max-width: 100%;
}

/* Remove any default carousel styles that might interfere */
.image-carousel-container[data-template="speaker_full"] .single-image {
    border-radius: 0 !important;
    perspective: 1000px;
    margin: 0;
    padding: 0;
    display: inline-block;
    vertical-align: top;
}

.image-carousel-container[data-template="speaker_full"] .single-image img,
.image-carousel-container[data-template="speaker_full"] .image-carousel-image img {
    border: none !important;
    border-radius: 0 !important;
}

.image-carousel-container[data-template="speaker_full"] .speaker-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.image-carousel-container[data-template="speaker_full"] .single-image:hover .speaker-card-inner {
    transform: rotateY(180deg);
}

.image-carousel-container[data-template="speaker_full"] .speaker-card-front,
.image-carousel-container[data-template="speaker_full"] .speaker-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: inherit;
    overflow: hidden;
}

/* Shadow variants */
.image-carousel-container[data-template="speaker_full"] .speaker-card-inner.has-shadow .speaker-card-front,
.image-carousel-container[data-template="speaker_full"] .speaker-card-inner.has-shadow .speaker-card-back {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.image-carousel-container[data-template="speaker_full"] .speaker-card-inner.no-shadow .speaker-card-front,
.image-carousel-container[data-template="speaker_full"] .speaker-card-inner.no-shadow .speaker-card-back {
    box-shadow: none;
}

.image-carousel-container[data-template="speaker_full"] .speaker-card-front {
    display: flex;
    flex-direction: column;
}

.image-carousel-container[data-template="speaker_full"] .speaker-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* Front: Image Container */
.image-carousel-container[data-template="speaker_full"] .image-carousel-image {
    width: 100%;
    height: 70%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-carousel-container[data-template="speaker_full"] .image-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    border: none;
    border-radius: 0;
}

/* Contain mode: auto height to fit image, no cutting */
.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .speaker-card-inner {
    height: auto !important;
}

/* For contain mode: front is relative to set height, back overlays */
.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .speaker-card-front {
    position: relative !important;
    height: auto !important;
    z-index: 1;
}

.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .speaker-card-back {
    position: absolute !important;
    height: 100% !important;
    top: 0;
    left: 0;
    z-index: 2;
}

/* Hide back by default in contain mode, show on hover with fade transition */
.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .speaker-card-front {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .speaker-card-back {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"]:hover .speaker-card-back {
    opacity: 1;
    pointer-events: auto;
}

.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"]:hover .speaker-card-front {
    opacity: 0;
}

.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .image-carousel-image {
    height: auto;
    background: transparent;
    padding: 0;
    margin: 0;
}

.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .image-carousel-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
}

.image-carousel-container[data-template="speaker_full"] .single-image[data-img-fit="contain"] .speaker-info {
    height: auto !important;
    padding: 10px;
}

/* Front: Info Container */
.image-carousel-container[data-template="speaker_full"] .speaker-info {
    height: 30%;
    padding: 15px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
}

.image-carousel-container[data-template="speaker_full"] .speaker-name {
    font-size: 16px;
    font-weight: 700;
    color: #2d3748;
    margin: 0 0 5px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-carousel-container[data-template="speaker_full"] .speaker-tagline {
    font-size: 13px;
    color: #718096;
    margin: 0;
    min-height: 1.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-style: italic;
}

/* Back: Gallery Text */
.image-carousel-container[data-template="speaker_full"] .speaker-gallery-text {
    color: #fff;
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.image-carousel-container[data-template="speaker_full"] .speaker-gallery-text p {
    margin: 0 0 10px 0;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

.image-carousel-container[data-template="speaker_full"] .speaker-card-back strong {
    display: block;
    font-size: 18px;
    margin-bottom: 15px;
    white-space: normal !important;
}

/* Hover indicator - removed as requested */

/* Hide scrollbars completely */
.image-carousel-container[data-template="speaker_full"]::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.image-carousel-container[data-template="speaker_full"] {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .image-carousel-container[data-template="speaker_full"] .speaker-name {
        font-size: 14px;
    }

    .image-carousel-container[data-template="speaker_full"] .speaker-tagline {
        font-size: 12px;
    }

    .image-carousel-container[data-template="speaker_full"] .speaker-gallery-text {
        font-size: 13px;
    }
}
