/**
 * WW BP Manager — Business Priority Cards
 *
 * Simplified structure:
 *   a.ww-bp-card (link + background image + overlay ::before)
 *     div.ww-bp-card-content (icon, title, intro, button)
 *
 * @since 0.4.12
 */

/* =======================================================================
   Card Grid Container
   ======================================================================= */
.ww-bp-cards {
    display: grid;
    grid-template-columns: repeat(var(--bp-card-columns, 3), 1fr);
    gap: 24px;
    margin: 30px 0;
}

@media (max-width: 992px) {
    .ww-bp-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .ww-bp-cards {
        grid-template-columns: 1fr;
    }
}

/* =======================================================================
   Card (a tag) - handles link, image, overlay, hover
   Only targets a.ww-bp-card to avoid conflicts with utility class usage
   ======================================================================= */
a.ww-bp-card {
    position: relative;
    display: block;
    min-height: 380px;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    background-size: cover;
    background-position: center;
    background-color: var(--ww-color-a, #014c8f);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

a.ww-bp-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

/* Color overlay via ::before */
a.ww-bp-card::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.85;
    transition: background 0.3s ease;
}

/* Overlay colors */
a.ww-bp-card.ww-bp-card-overlay--a::before { background: var(--ww-color-a, #014c8f); }
a.ww-bp-card.ww-bp-card-overlay--b::before { background: var(--ww-color-b, #032467); }
a.ww-bp-card.ww-bp-card-overlay--c::before { background: var(--ww-color-c, #fd5401); }
a.ww-bp-card.ww-bp-card-overlay--d::before { background: var(--ww-color-d, #6c6f71); }

/* Hover: switch to Color C */
a.ww-bp-card:hover::before {
    background: var(--ww-color-c, #fd5401);
    opacity: 0.9;
}

/* =======================================================================
   Card Content
   ======================================================================= */
.ww-bp-card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px 24px;
    min-height: 380px;
}

/* =======================================================================
   Icon
   ======================================================================= */
.ww-bp-card-icon {
    width: 72px;
    height: 72px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

a.ww-bp-card:hover .ww-bp-card-icon {
    transform: scale(1.05);
}

.ww-bp-card-icon svg {
    width: 40px;
    height: 40px;
}

/* Icon colors match overlay */
.ww-bp-card-overlay--a .ww-bp-card-icon svg { fill: var(--ww-color-a, #014c8f); }
.ww-bp-card-overlay--b .ww-bp-card-icon svg { fill: var(--ww-color-b, #032467); }
.ww-bp-card-overlay--c .ww-bp-card-icon svg { fill: var(--ww-color-c, #fd5401); }
.ww-bp-card-overlay--d .ww-bp-card-icon svg { fill: var(--ww-color-d, #6c6f71); }

/* Hover: icon switches to Color C */
a.ww-bp-card:hover .ww-bp-card-icon svg {
    fill: var(--ww-color-c, #fd5401);
}

.ww-bp-card-icon-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

/* =======================================================================
   Title
   ======================================================================= */
.ww-bp-card-title {
    margin: 0 0 16px;
    font-size: 1.5em;
    font-weight: 400;
    line-height: 1.3;
    color: #fff;
}

.ww-bp-card-title-prefix {
    display: block;
    font-size: 0.85em;
    font-weight: 400;
    opacity: 0.9;
    margin-bottom: 4px;
}

.ww-bp-card-title-main {
    display: block;
    font-size: 1.3em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =======================================================================
   Intro Text
   ======================================================================= */
.ww-bp-card-intro {
    margin: 0 0 24px;
    font-size: 0.95em;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.95);
    max-width: 90%;
}

/* =======================================================================
   Button
   ======================================================================= */
.ww-bp-card-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #fff;
    font-weight: 600;
    font-size: 0.95em;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: transform 0.2s ease;
}

/* Button text color matches overlay */
.ww-bp-card-overlay--a .ww-bp-card-btn { color: var(--ww-color-a, #014c8f); }
.ww-bp-card-overlay--b .ww-bp-card-btn { color: var(--ww-color-b, #032467); }
.ww-bp-card-overlay--c .ww-bp-card-btn { color: var(--ww-color-c, #fd5401); }
.ww-bp-card-overlay--d .ww-bp-card-btn { color: var(--ww-color-d, #6c6f71); }

/* Hover: button switches to Color C */
a.ww-bp-card:hover .ww-bp-card-btn {
    color: var(--ww-color-c, #fd5401);
    transform: scale(1.02);
}

/* =======================================================================
   Responsive
   ======================================================================= */
@media (max-width: 768px) {
    a.ww-bp-card,
    .ww-bp-card-content {
        min-height: 340px;
    }

    .ww-bp-card-title {
        font-size: 1.3em;
    }

    .ww-bp-card-intro {
        font-size: 0.9em;
    }

    .ww-bp-card-icon {
        width: 60px;
        height: 60px;
    }

    .ww-bp-card-icon svg,
    .ww-bp-card-icon-img {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    a.ww-bp-card,
    .ww-bp-card-content {
        min-height: 300px;
    }

    .ww-bp-card-content {
        padding: 24px 20px;
    }

    .ww-bp-card-intro {
        max-width: 100%;
    }
}
