/* 
 * Hover Effects for Elementor - eCOUNT Style
 * Version 1.2.1 - Einheitliche Box-Höhen (dynamisch)
 */

.hee-container {
    width: 100%;
}

.hee-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* For masonry layout */
.hee-masonry {
    display: block;
    column-count: 3;
    column-gap: 20px;
}

.hee-masonry .hee-item {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Base styling for items */
.hee-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 400px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hee-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.hee-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Background Image */
.hee-item-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: all 0.5s ease;
}

/* Dunkles Overlay über Bild */
.hee-item-img::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
        rgba(0, 0, 0, 0.2) 0%, 
        rgba(0, 0, 0, 0.4) 100%);
    transition: opacity 0.3s ease;
}

.hee-item:hover .hee-item-img {
    transform: scale(1.05);
}

/* Nummer Badge oben links */
.hee-item-number {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: #2c2c2c;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hee-item:hover .hee-item-number {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Icon unter der Nummer (optional) */
.hee-item-icon {
    position: absolute;
    top: 80px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: rgba(0, 168, 225, 0.95);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 168, 225, 0.3);
    transition: all 0.3s ease;
}

.hee-item:hover .hee-item-icon {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 168, 225, 0.4);
}

/* ============================================
   CONTENT BOX - DYNAMISCH EINHEITLICHE HÖHE
   JavaScript gleicht die Höhen an
   ============================================ */

.hee-item-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    /* WICHTIG: Keine feste Höhe - wird per JS angeglichen */
    /* min-height wird per JS auf die höchste Box gesetzt */
    background: white;
    border-radius: 16px;
    padding: 24px;
    z-index: 2;
    transition: box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 1 !important;
    /* Flexbox für Content */
    display: flex;
    flex-direction: column;
}

.hee-item:hover .hee-item-overlay {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

/* Content-Wrapper: Nutzt volle Höhe */
.hee-item-content {
    text-align: left;
    width: 100%;
    flex: 1;
    /* FLEXBOX: Titel oben, Beschreibung unten */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Mindestabstand zwischen Titel und Beschreibung */
    gap: 30px;
}

/* TITEL - Oben in der Box */
.hee-item-title {
    color: #2c2c2c;
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
    opacity: 1;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.hee-item:hover .hee-item-title {
    color: #00A8E1;
}

/* BESCHREIBUNG - Unten in der Box */
.hee-item-description {
    color: #666666;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.55;
    margin: 0;
    opacity: 1;
    transition: color 0.3s ease;
    /* Wird durch space-between nach unten gedrückt */
}

.hee-item:hover .hee-item-description {
    color: #444444;
}

/* Link über gesamte Karte */
.hee-item-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    text-decoration: none;
}

/* ============================================
   RESPONSIVE ANPASSUNGEN
   ============================================ */

@media (max-width: 1024px) {
    .hee-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hee-item {
        height: 380px;
    }
}

@media (max-width: 768px) {
    .hee-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .hee-item {
        height: 360px;
    }
    
    .hee-item-overlay {
        padding: 20px;
    }
    
    .hee-item-title {
        font-size: 18px;
    }
    
    .hee-item-description {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .hee-item-number {
        width: 45px;
        height: 45px;
        font-size: 14px;
        top: 15px;
        left: 15px;
    }
    
    .hee-item-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
        top: 70px;
        left: 15px;
    }
}

/* ============================================
   ALTE HOVER-EFFEKTE DEAKTIVIERT
   ============================================ */

.hee-effect-fade .hee-item-overlay,
.hee-effect-zoom .hee-item-overlay,
.hee-effect-slide-up .hee-item-overlay,
.hee-effect-slide-down .hee-item-overlay,
.hee-effect-slide-left .hee-item-overlay,
.hee-effect-slide-right .hee-item-overlay {
    opacity: 1 !important;
}

/* Optionale Effekte */
.hee-item.subtle-zoom:hover .hee-item-img {
    transform: scale(1.08);
}

.hee-item.glow-effect:hover {
    box-shadow: 0 12px 32px rgba(0, 168, 225, 0.25);
}

/* Print Styles */
@media print {
    .hee-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .hee-item-link {
        display: none;
    }
}
