/* Butterfly Image Widget - Erweiterte Styles */

/* Hover Effects */
.tp-butterfly-hover-zoom img {
    transition: transform var(--animation-speed, 0.5s) ease;
}

.tp-butterfly-hover-zoom:hover img {
    transform: scale(1.1);
}

.tp-butterfly-hover-rotate img {
    transition: transform var(--animation-speed, 0.5s) ease;
}

.tp-butterfly-hover-rotate:hover img {
    transform: rotate(5deg);
}

.tp-butterfly-hover-flip {
    perspective: 1000px;
}

.tp-butterfly-hover-flip img {
    transition: transform var(--animation-speed, 0.5s) ease;
    transform-style: preserve-3d;
}

.tp-butterfly-hover-flip:hover img {
    transform: rotateY(180deg);
}

.tp-butterfly-hover-glow img {
    transition: all var(--animation-speed, 0.5s) ease;
}

.tp-butterfly-hover-glow:hover img {
    box-shadow: 0 0 30px rgba(0, 123, 186, 0.6);
    filter: brightness(1.1);
}

/* Shape Styles */
.tp-shape-circle img {
    border-radius: 50%;
}

.tp-shape-hexagon {
    position: relative;
    overflow: hidden;
}

.tp-shape-hexagon img {
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.tp-shape-triangle img {
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.tp-shape-flower img {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.tp-shape-star img {
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.tp-shape-diamond img {
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

/* Layout 3: Modern Card Style */
.tp-butterfly-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.tp-butterfly-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.tp-butterfly-card-image {
    position: relative;
    overflow: hidden;
}

.tp-butterfly-card-image img {
    width: 100%;
    height: auto;
    display: block;
}

.tp-butterfly-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 123, 186, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tp-butterfly-card-image:hover .tp-butterfly-overlay {
    opacity: 1;
}

.tp-butterfly-overlay span {
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.tp-butterfly-card-content {
    padding: 20px;
}

.tp-butterfly-card-content h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333333;
}

/* Layout 4: Gallery Grid Style */
.tp-butterfly-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    max-width: 800px;
}

.tp-butterfly-gallery-main img,
.tp-butterfly-gallery-thumb img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.tp-butterfly-gallery-main img:hover,
.tp-butterfly-gallery-thumb img:hover {
    transform: scale(1.05);
}

/* Layout 5: Interactive Style */
.tp-butterfly-interactive {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.tp-butterfly-interactive-main {
    position: relative;
}

.tp-butterfly-interactive-main img {
    width: 100%;
    height: auto;
    display: block;
}

.tp-butterfly-interactive-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #ffffff;
    padding: 30px 20px 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.tp-butterfly-interactive:hover .tp-butterfly-interactive-overlay {
    transform: translateY(0);
}

.tp-butterfly-interactive-overlay h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}

.tp-butterfly-interactive-arrow {
    font-size: 20px;
    font-weight: bold;
    opacity: 0.8;
}

/* Layout 6: 3x3 Grid Style */
.tp-butterfly-grid-3x3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    max-width: 900px;
    margin: 0 auto;
}

.tp-grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tp-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.tp-grid-main {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.tp-grid-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Layout 7: Masonry Grid Style */
.tp-butterfly-masonry {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 200px;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.tp-masonry-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.tp-masonry-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.tp-masonry-large {
    grid-column: 1 / 3;
    grid-row: 1 / 3;
}

.tp-masonry-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* Layout 8: Hexagon Grid Style */
.tp-butterfly-hexagon-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 0;
}

.tp-hexagon-item {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.tp-hexagon-inner {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    overflow: hidden;
    transition: all 0.3s ease;
}

.tp-hexagon-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.tp-hexagon-item:hover .tp-hexagon-inner {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Layout 9: Overlapping Images Style */
.tp-butterfly-overlapping {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.tp-overlap-container {
    position: relative;
    height: 400px;
}

.tp-overlap-item {
    position: absolute;
    transition: all 0.3s ease;
}

.tp-overlap-main {
    top: 0;
    left: 0;
    z-index: 3;
}

.tp-overlap-secondary {
    top: var(--overlap, 50px);
    left: var(--overlap, 50px);
    z-index: 2;
}

.tp-overlap-tertiary {
    top: calc(var(--overlap, 50px) * 2);
    left: calc(var(--overlap, 50px) * 2);
    z-index: 1;
}

.tp-overlap-item img {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.tp-overlap-item:hover {
    transform: translateY(-10px);
    z-index: 10;
}

.tp-overlap-item:hover img {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

/* Layout 10: High-End Overlapping Style */
.tp-butterfly-high-end {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

.tp-high-end-container {
    position: relative;
    height: 500px;
}

.tp-high-end-item {
    position: absolute;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.tp-high-end-main {
    top: 0;
    left: 0;
    z-index: 3;
}

.tp-high-end-secondary {
    top: var(--overlap, 50px);
    right: 0;
    z-index: 2;
}

.tp-high-end-tertiary {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
}

.tp-high-end-image {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.tp-high-end-image img {
    width: 350px;
    height: 350px;
    object-fit: cover;
    transition: all 0.4s ease;
}

.tp-high-end-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 123, 186, 0.9), rgba(102, 126, 234, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tp-high-end-image:hover .tp-high-end-overlay {
    opacity: 1;
}

.tp-high-end-overlay h3 {
    color: #ffffff;
    font-size: 28px;
    font-weight: 600;
    text-align: center;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.tp-high-end-item:hover {
    transform: translateY(-15px) scale(1.02);
    z-index: 10;
}

.tp-high-end-item:hover .tp-high-end-image {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

/* Parallax Effect */
.tp-butterfly-parallax {
    transform: translateZ(0);
    will-change: transform;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tp-butterfly-grid-3x3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tp-grid-main {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    
    .tp-butterfly-masonry {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tp-masonry-large {
        grid-column: 1 / 2;
        grid-row: 1 / 2;
    }
    
    .tp-butterfly-hexagon-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
    
    .tp-hexagon-item {
        width: 80px;
        height: 80px;
    }
    
    .tp-overlap-item img,
    .tp-high-end-image img {
        width: 200px;
        height: 200px;
    }
    
    .tp-overlap-container,
    .tp-high-end-container {
        height: 300px;
    }
    
    .tp-butterfly-card-content {
        padding: 15px;
    }
    
    .tp-butterfly-card-content h3 {
        font-size: 18px;
    }
    
    .tp-butterfly-interactive-overlay {
        padding: 20px 15px 15px;
    }
    
    .tp-butterfly-interactive-overlay h3 {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .tp-butterfly-grid-3x3 {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .tp-butterfly-masonry {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .tp-butterfly-hexagon-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .tp-hexagon-item {
        width: 60px;
        height: 60px;
    }
    
    .tp-overlap-item img,
    .tp-high-end-image img {
        width: 150px;
        height: 150px;
    }
    
    .tp-overlap-container,
    .tp-high-end-container {
        height: 250px;
    }
    
    .tp-butterfly-card-content {
        padding: 12px;
    }
    
    .tp-butterfly-card-content h3 {
        font-size: 16px;
    }
    
    .tp-butterfly-interactive-overlay {
        padding: 15px 12px 12px;
    }
    
    .tp-butterfly-interactive-overlay h3 {
        font-size: 18px;
    }
    
    .tp-high-end-overlay h3 {
        font-size: 20px;
    }
}
