/* ==========================================================================
   BSTI CERTIFIED CARD - ELEMENTOR CUSTOM WIDGET STYLES
   Prefix: bcc- (BSTI Certified Card)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts Import (Bengali & English Fallbacks)
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;600;700&family=Hind+Siliguri:wght@400;500;600;700&family=Noto+Sans+Bengali:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   Card Wrapper & Main Container
   -------------------------------------------------------------------------- */
.bcc-certified-card {
    position: relative;
    width: 100%;
    max-width: 340px;
    min-height: 255px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 28px 25px;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(177, 145, 101, 0.18);
    border-radius: 18px;
    box-shadow: 0 12px 35px rgba(112, 92, 60, 0.10);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.35s cubic-bezier(0.25, 1, 0.5, 1),
                background-color 0.35s ease,
                border-color 0.35s ease;
    margin-left: auto;
    margin-right: auto;
    text-decoration: none;
}

/* When Card Link is active */
a.bcc-certified-card,
a.bcc-certified-card:hover,
a.bcc-certified-card:focus {
    text-decoration: none;
    color: inherit;
    display: flex;
}

/* Card Inner Container */
.bcc-card-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   Content Order Variations
   -------------------------------------------------------------------------- */
.bcc-card-inner.bcc-order-icon_title_desc {
    flex-direction: column;
}
.bcc-card-inner.bcc-order-title_icon_desc .bcc-icon-wrapper {
    order: 2;
    margin-top: 15px;
    margin-bottom: 20px;
}
.bcc-card-inner.bcc-order-title_icon_desc .bcc-title {
    order: 1;
}
.bcc-card-inner.bcc-order-title_icon_desc .bcc-description {
    order: 3;
}
.bcc-card-inner.bcc-order-title_desc_icon .bcc-icon-wrapper {
    order: 3;
    margin-top: 20px;
    margin-bottom: 0;
}
.bcc-card-inner.bcc-order-title_desc_icon .bcc-title {
    order: 1;
}
.bcc-card-inner.bcc-order-title_desc_icon .bcc-description {
    order: 2;
}

/* --------------------------------------------------------------------------
   Alignment Settings (Card, Content & Icon Box)
   -------------------------------------------------------------------------- */

/* Content Alignment */
.bcc-align-left .bcc-card-inner {
    align-items: flex-start;
    text-align: left;
}
.bcc-align-left .bcc-content {
    text-align: left;
}

.bcc-align-center .bcc-card-inner {
    align-items: center;
    text-align: center;
}
.bcc-align-center .bcc-content {
    text-align: center;
}

.bcc-align-right .bcc-card-inner {
    align-items: flex-end;
    text-align: right;
}
.bcc-align-right .bcc-content {
    text-align: right;
}

/* Vertical Alignment */
.bcc-valign-top {
    justify-content: flex-start;
}
.bcc-valign-center {
    justify-content: center;
}
.bcc-valign-bottom {
    justify-content: flex-end;
}
.bcc-valign-space-between {
    justify-content: space-between;
}

/* Icon Box Wrapper & Specific Alignment Control */
.bcc-icon-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 26px;
    box-sizing: border-box;
}

.bcc-icon-wrapper.bcc-icon-align-left {
    justify-content: flex-start;
}
.bcc-icon-wrapper.bcc-icon-align-center {
    justify-content: center;
}
.bcc-icon-wrapper.bcc-icon-align-right {
    justify-content: flex-end;
}

/* --------------------------------------------------------------------------
   Icon Box
   -------------------------------------------------------------------------- */
.bcc-icon-box {
    width: 62px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #faf9f6;
    border: 1px solid rgba(164, 128, 83, 0.30);
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease, border-color 0.35s ease;
    overflow: hidden;
    position: relative;
}

/* Icon Container */
.bcc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 24px;
    color: #b19165;
    transition: transform 0.35s ease, color 0.35s ease;
}

.bcc-icon svg {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

.bcc-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* --------------------------------------------------------------------------
   Default Medal Badge Design (Vector Ribbon + Star Medallion)
   -------------------------------------------------------------------------- */
.bcc-medal-icon {
    position: relative;
    width: 38px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ribbons */
.bcc-ribbon {
    position: absolute;
    top: 0;
    width: 11px;
    height: 21px;
    border-radius: 2px;
    transform-origin: bottom center;
}

.bcc-ribbon-left {
    left: 9px;
    background: #4d9fe8;
    transform: rotate(-32deg);
}

.bcc-ribbon-right {
    right: 9px;
    background: #ef5a58;
    transform: rotate(32deg);
}

/* Medal Circle */
.bcc-medal-circle {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 23px;
    height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eaa23a;
    border-radius: 50%;
    box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.10),
                0 3px 5px rgba(0, 0, 0, 0.10);
    z-index: 2;
}

.bcc-medal-circle span,
.bcc-medal-circle .bcc-star-glyph {
    color: #ffffff;
    font-size: 11px;
    line-height: 1;
    display: inline-block;
    user-select: none;
}

/* --------------------------------------------------------------------------
   Icon & Emoji Animations (@keyframes)
   -------------------------------------------------------------------------- */

/* Float / Levitating */
@keyframes bcc-anim-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-7px);
    }
}

/* Pulse / Breathing */
@keyframes bcc-anim-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.14);
    }
}

/* Gentle Medal Sway / Pendulum Swing */
@keyframes bcc-anim-sway {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(10deg);
    }
    75% {
        transform: rotate(-10deg);
    }
}

/* Glow Pulse */
@keyframes bcc-anim-glow {
    0%, 100% {
        filter: drop-shadow(0 0 4px rgba(234, 162, 58, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 14px rgba(234, 162, 58, 0.85)) brightness(1.15);
    }
}

/* Bounce */
@keyframes bcc-anim-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Spin / Rotate */
@keyframes bcc-anim-spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Wiggle */
@keyframes bcc-anim-wiggle {
    0%, 100% { transform: rotate(0deg); }
    20% { transform: rotate(-8deg); }
    40% { transform: rotate(8deg); }
    60% { transform: rotate(-4deg); }
    80% { transform: rotate(4deg); }
}

/* Active Animation Utility Classes */
.bcc-anim-float {
    animation: bcc-anim-float var(--bcc-anim-duration, 3s) ease-in-out infinite;
}

.bcc-anim-pulse {
    animation: bcc-anim-pulse var(--bcc-anim-duration, 2s) ease-in-out infinite;
}

.bcc-anim-sway {
    transform-origin: top center;
    animation: bcc-anim-sway var(--bcc-anim-duration, 3.5s) ease-in-out infinite;
}

.bcc-anim-glow {
    animation: bcc-anim-glow var(--bcc-anim-duration, 2.5s) ease-in-out infinite;
}

.bcc-anim-bounce {
    animation: bcc-anim-bounce var(--bcc-anim-duration, 2.2s) infinite;
}

.bcc-anim-spin {
    animation: bcc-anim-spin var(--bcc-anim-duration, 8s) linear infinite;
}

.bcc-anim-wiggle {
    animation: bcc-anim-wiggle var(--bcc-anim-duration, 2s) ease-in-out infinite;
}

/* Hover-triggered Icon Animations */
.bcc-certified-card:hover .bcc-icon.bcc-hover-anim-spin,
.bcc-icon.bcc-hover-anim-spin:hover {
    transform: rotate(360deg);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bcc-certified-card:hover .bcc-icon.bcc-hover-anim-bounce,
.bcc-icon.bcc-hover-anim-bounce:hover {
    animation: bcc-anim-bounce 1s ease;
}

.bcc-certified-card:hover .bcc-icon.bcc-hover-anim-pulse,
.bcc-icon.bcc-hover-anim-pulse:hover {
    transform: scale(1.22);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --------------------------------------------------------------------------
   Standalone .why-icon Styles & Color Presets
   -------------------------------------------------------------------------- */
.why-icon,
.bcc-why-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    line-height: 1;
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: #faf9f6;
    border: 1px solid rgba(177, 145, 101, 0.25);
    box-shadow: 0 4px 14px rgba(112, 92, 60, 0.08);
    transition: all 0.35s ease;
    user-select: none;
    position: relative;
    color: #eaa23a;
}

.why-icon:hover,
.bcc-why-icon:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 24px rgba(177, 145, 101, 0.2);
    border-color: #b19165;
}

/* Why Icon Color Presets */
.why-icon.gold,
.bcc-why-icon.gold {
    color: #eaa23a;
    border-color: rgba(234, 162, 58, 0.35);
    background: linear-gradient(135deg, #fffcf5 0%, #fff4e0 100%);
    box-shadow: 0 4px 15px rgba(234, 162, 58, 0.15);
}

.why-icon.emerald,
.bcc-why-icon.emerald {
    color: #2e8b57;
    border-color: rgba(46, 139, 87, 0.35);
    background: linear-gradient(135deg, #f4fbf7 0%, #e3f5ec 100%);
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.15);
}

.why-icon.royal,
.bcc-why-icon.royal {
    color: #8b663d;
    border-color: rgba(139, 102, 61, 0.35);
    background: linear-gradient(135deg, #fcf9f5 0%, #f4ebe0 100%);
    box-shadow: 0 4px 15px rgba(139, 102, 61, 0.15);
}

.why-icon.sapphire,
.bcc-why-icon.sapphire {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.35);
    background: linear-gradient(135deg, #f5f9ff 0%, #e0edff 100%);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.why-icon.ruby,
.bcc-why-icon.ruby {
    color: #ef5a58;
    border-color: rgba(239, 90, 88, 0.35);
    background: linear-gradient(135deg, #fff6f6 0%, #ffe6e5 100%);
    box-shadow: 0 4px 15px rgba(239, 90, 88, 0.15);
}


/* --------------------------------------------------------------------------
   Content Area (Title & Description)
   -------------------------------------------------------------------------- */
.bcc-content {
    width: 100%;
    box-sizing: border-box;
}

/* Title */
.bcc-title {
    margin: 0 0 13px 0;
    color: #8b663d;
    font-family: Georgia, "Times New Roman", "Cinzel", serif;
    font-size: 25px;
    font-weight: 500;
    letter-spacing: 0.3px;
    line-height: 1.2;
    transition: color 0.35s ease;
    word-break: break-word;
}

/* Description */
.bcc-description {
    margin: 0;
    color: #6d6258;
    font-family: "Noto Sans Bengali", "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.75;
    transition: color 0.35s ease;
    word-break: break-word;
}

.bcc-description p {
    margin: 0;
    line-height: inherit;
    color: inherit;
    font-size: inherit;
    font-family: inherit;
}

.bcc-description p + p {
    margin-top: 6px;
}

/* --------------------------------------------------------------------------
   Hover Effects
   -------------------------------------------------------------------------- */
.bcc-hover-lift:hover {
    transform: translateY(var(--bcc-hover-translate-y, -6px));
    box-shadow: 0 20px 45px rgba(112, 92, 60, 0.16);
}

.bcc-hover-scale_up:hover {
    transform: scale(var(--bcc-hover-scale, 1.03));
    box-shadow: 0 20px 45px rgba(112, 92, 60, 0.16);
}

.bcc-hover-scale_down:hover {
    transform: scale(var(--bcc-hover-scale, 0.97));
    box-shadow: 0 8px 20px rgba(112, 92, 60, 0.08);
}

.bcc-hover-glow:hover {
    box-shadow: 0 0 28px rgba(234, 162, 58, 0.35), 0 12px 35px rgba(112, 92, 60, 0.12);
    border-color: rgba(234, 162, 58, 0.45);
}

.bcc-hover-shadow_increase:hover {
    box-shadow: 0 25px 50px rgba(112, 92, 60, 0.22);
}

.bcc-hover-border_highlight:hover {
    border-color: #b19165;
    box-shadow: 0 16px 40px rgba(177, 145, 101, 0.18);
}

/* Icon Box Animation on Card Hover */
.bcc-certified-card:hover .bcc-icon-box {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(177, 145, 101, 0.15);
}

.bcc-certified-card:hover .bcc-medal-circle {
    transform: translateX(-50%) scale(1.06);
    transition: transform 0.3s ease;
}

/* --------------------------------------------------------------------------
   Entrance Animation Support
   -------------------------------------------------------------------------- */
.bcc-animated-ready {
    opacity: 0;
    transform: translateY(25px);
}

.bcc-animated-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.7s cubic-bezier(0.25, 1, 0.5, 1),
                box-shadow 0.35s ease;
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .bcc-certified-card {
        padding: 26px 22px;
    }
}

@media (max-width: 767px) {
    .bcc-certified-card {
        max-width: 100%;
        min-height: 230px;
        padding: 24px 18px;
    }

    .bcc-icon-box {
        margin-bottom: 20px;
    }

    .bcc-title {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .bcc-description {
        font-size: 14px;
        line-height: 1.65;
    }
}
