/**
 * Marthoma Church Theme - Card Styles & Hover Effects
 *
 * @package MarthomaChurch
 */

/* Card Base Styles */
.marthoma-card,
.card {
    background: #ffffff;
    border-radius: 22px;
    box-shadow: 0px 7px 13.6px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.marthoma-card:hover,
.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Card Hover Effect Class (for Elementor) */
.card-hover-effect {
    transition: all 0.3s ease-in-out;
    cursor: pointer;
}

.card-hover-effect:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

/* Remove hover effects on images within cards */
.card-hover-effect img,
.marthoma-card img {
    transition: none !important;
}

.card-hover-effect:hover img,
.marthoma-card:hover img {
    transform: none !important;
}

/* Card Components */
.card__image {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.card__content {
    padding: 24px;
}

.card__title {
    font-size: var(--marthoma-font-size-h5, 21px);
    margin-bottom: 12px;
    color: var(--marthoma-primary, #000000);
}

.card__text {
    color: var(--marthoma-text, #7A7A7A);
    margin-bottom: 16px;
}

.card__meta {
    font-size: var(--marthoma-font-size-small, 14px);
    color: var(--marthoma-secondary, #54595F);
}

.card__link {
    color: var(--marthoma-button, #375EFB);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card__link:hover {
    color: var(--marthoma-accent, #5251FF);
}

/* Card Variants */

/* Dark Card */
.card--dark {
    background: var(--marthoma-dark-navy, #072538);
    color: #ffffff;
}

.card--dark .card__title {
    color: #ffffff;
}

.card--dark .card__text {
    color: rgba(255, 255, 255, 0.8);
}

/* Light Card */
.card--light {
    background: var(--marthoma-light-gray, #F5F5F5);
    box-shadow: none;
}

.card--light:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* Bordered Card */
.card--bordered {
    box-shadow: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.card--bordered:hover {
    border-color: var(--marthoma-button, #375EFB);
    box-shadow: 0 10px 30px rgba(55, 94, 251, 0.1);
}

/* Card with Gradient Overlay */
.card--gradient {
    position: relative;
}

.card--gradient::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    pointer-events: none;
    border-radius: 0 0 22px 22px;
}

.card--gradient .card__content {
    position: relative;
    z-index: 1;
}

/* Horizontal Card */
.card--horizontal {
    display: flex;
    flex-direction: row;
}

.card--horizontal .card__image {
    width: 40%;
    min-height: 100%;
    object-fit: cover;
}

.card--horizontal .card__content {
    width: 60%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

/* Elementor Card Hover Effects */
.elementor-widget-container .card-hover-effect,
.e-con .card-hover-effect {
    transition: all 0.3s ease-in-out;
}

/* Featured Card */
.card--featured {
    border: 2px solid var(--marthoma-button, #375EFB);
}

.card--featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--marthoma-button, #375EFB);
}

/* Subtle Hover Variants */

/* Lift Effect Only */
.card-hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Scale Effect Only */
.card-hover-scale {
    transition: transform 0.3s ease;
}

.card-hover-scale:hover {
    transform: scale(1.05);
}

/* Glow Effect */
.card-hover-glow {
    transition: box-shadow 0.3s ease;
}

.card-hover-glow:hover {
    box-shadow: 0 0 30px rgba(55, 94, 251, 0.3);
}

/* Border Animation */
.card-hover-border {
    position: relative;
    transition: all 0.3s ease;
}

.card-hover-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: 22px;
    transition: border-color 0.3s ease;
}

.card-hover-border:hover::before {
    border-color: var(--marthoma-button, #375EFB);
}

/* Responsive */
@media (max-width: 768px) {
    .card-hover-effect:hover,
    .marthoma-card:hover,
    .card:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    }

    .card--horizontal {
        flex-direction: column;
    }

    .card--horizontal .card__image,
    .card--horizontal .card__content {
        width: 100%;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card__content {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .marthoma-card,
    .card {
        border-radius: 16px;
    }

    .card__content {
        padding: 16px;
    }
}
