/* Custom Card Widget Styles */
.custom-card {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
    z-index: 1;
}

/* Base styling for all hover animations */
.custom-card:before {
    content: '';
    position: absolute;
    z-index: -1;
    transition: all 0.3s ease;
}

/* Use JavaScript to apply hover color */
.custom-card:before {
    background-color: var(--hover-color, #3f51b5);
}

/* Animation: Bottom to Top (default) */
.custom-card.animation-bottom-to-top:before {
    left: 0;
    bottom: 0;
    width: 100%;
    height: 0;
}

.custom-card.animation-bottom-to-top:hover:before {
    height: 100%;
}

/* Animation: Top to Bottom */
.custom-card.animation-top-to-bottom:before {
    left: 0;
    top: 0;
    width: 100%;
    height: 0;
}

.custom-card.animation-top-to-bottom:hover:before {
    height: 100%;
}

/* Animation: Left to Right */
.custom-card.animation-left-to-right:before {
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
}

.custom-card.animation-left-to-right:hover:before {
    width: 100%;
}

/* Animation: Right to Left */
.custom-card.animation-right-to-left:before {
    right: 0;
    left: auto;
    top: 0;
    width: 0;
    height: 100%;
}

.custom-card.animation-right-to-left:hover:before {
    width: 100%;
}

/* Animation: Center Out */
.custom-card.animation-center-out:before {
    left: 50%;
    top: 50%;
    width: 0;
    height: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    opacity: 0;
}

.custom-card.animation-center-out:hover:before {
    width: 300%;
    height: 300%;
    opacity: 1;
}

/* Animation: Fade In */
.custom-card.animation-fade-in:before {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.custom-card.animation-fade-in:hover:before {
    opacity: 1;
}

.custom-card-content {
    text-align: center;
    z-index: 2;
    position: relative;
    width: 100%;
}

.custom-card-heading {
    margin-top: 0;
    margin-bottom: 15px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
}

/* Base separator style */
.custom-card-separator {
    height: 3px;
    width: 50px;
    background-color: #ffffff;
    margin: 0 auto 15px;
}

/* Different separator styles */
.custom-card-separator.separator-solid {
    background-color: #ffffff;
    height: 3px;
    border: none;
}

.custom-card-separator.separator-dotted {
    background: none;
    height: 0;
    border-top: 3px dotted #ffffff;
}

.custom-card-separator.separator-dashed {
    background: none;
    height: 0;
    border-top: 3px dashed #ffffff;
}

.custom-card-separator.separator-double {
    background: none;
    height: 0;
    border-top: 3px double #ffffff;
}

/* Animated separator */
.custom-card-separator.separator-animated {
    position: relative;
    overflow: hidden;
}

.custom-card-separator.separator-animated:after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    animation: separator-animation 2s infinite;
}

@keyframes separator-animation {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.custom-card-description {
    color: #ffffff;
    font-size: 16px;
    line-height: 1.6;
}

/* Button styles */
.custom-card-button {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 20px;
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.custom-card-button:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Add a semi-transparent overlay to make text readable on image backgrounds */
.custom-card:after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: -2;
}