/* ============================================================
   CREO — Marketing / The Problem Section  (highlight-card redesign)
   ============================================================ */

@keyframes rotateBorder {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ─── SECTION ───────────────────────────────────────────────── */
.mkt-problem {
    position: relative;
    background: var(--creo-dark);
    color: var(--creo-white);
    overflow: hidden;
    padding: 120px 0;
}

/* Grid overlay */
.mkt-problem__bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

/* ─── HEADER ────────────────────────────────────────────────── */
.mkt-problem__header {
    text-align: center;
    margin-bottom: 72px;
}

.mkt-problem__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.8);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    margin-bottom: 28px;
}

.mkt-problem__headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5.5vw, 4.25rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: var(--creo-white);
    margin-bottom: 20px;
}

.mkt-problem__headline span {
    color: var(--creo-accent-hover);
    display: block;
}

.mkt-problem__sub {
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

/* ─── CARDS GRID ─────────────────────────────────────────────── */
.mkt-problem__cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;
}

/* ─── CARD BASE ──────────────────────────────────────────────── */
.prob-card {
    position: relative;
    border-radius: 16px;
    /* User requirement: 16px */
    background: transparent;
    /* Changed to transparent to let glow show behind mask */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    overflow: hidden;
    cursor: default;
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.4s ease;
}

.prob-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 15px 35px -5px rgba(0, 0, 0, 0.5),
        0 0 25px rgba(255, 106, 0, 0.2);
}

/* Static Background Layer — Acts as a mask for the rotating light below */
.prob-card::after {
    content: '';
    position: absolute;
    inset: 1.2px;
    /* Gap for the border light */
    background: var(--creo-dark);
    border-radius: 15px;
    z-index: 1;
    /* Above Light, Below Background FX */
    pointer-events: none;
}

/* ─── ANIMATED NEON BORDER EFFECT ───────────────────────────── */
/* Rotating Light Layer — Underneath everything else */
.prob-card::before {
    content: '';
    position: absolute;
    width: 300%;
    height: 300%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    z-index: 0;
    pointer-events: none;

    /* Triple-peak gradient for constant light presence */
    background: conic-gradient(transparent 0deg,
            rgba(255, 255, 255, 1) 60deg,
            transparent 120deg,
            rgba(255, 255, 255, 0.4) 180deg,
            transparent 240deg,
            rgba(255, 255, 255, 1) 300deg,
            transparent 360deg);

    animation: rotateBorder 6s linear infinite;
    opacity: 0.8;
    transition: opacity 0.4s ease, filter 0.4s ease;
}

.prob-card:hover::before {
    opacity: 1;
    background: conic-gradient(transparent 0deg,
            #FF6A00 60deg,
            transparent 120deg,
            #FF6A00 180deg,
            transparent 240deg,
            #FF6A00 300deg,
            transparent 360deg);
    filter: blur(1px) drop-shadow(0 0 10px rgba(255, 106, 0, 1));
}

/* ─── BACKGROUND FX LAYER ────────────────────────────────────── */
.prob-card__bg {
    position: absolute;
    inset: 1.2px;
    /* Gap for border */
    z-index: 2;
    /* Content BG layer above mask */
    overflow: hidden;
    pointer-events: none;
    border-radius: 15px;
}

/* Inner gradient overlay — transparent, sin tinte cálido */
.prob-card__bg-gradient {
    position: absolute;
    inset: 0;
    background: transparent;
    opacity: 0;
}

/* Orb — bottom left bounce */
.prob-card__orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.prob-card__orb--bottom {
    bottom: -60px;
    left: -60px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle,
            rgba(8, 18, 55, 0.95) 0%,
            transparent 70%);
    filter: blur(24px);
    animation: probOrbBounce 3s ease-in-out infinite;
    opacity: 0.7;
    transition: opacity 0.7s ease;
}

.prob-card:hover .prob-card__orb--bottom {
    opacity: 1;
}

/* Orb — top left ping */
.prob-card__orb--tl {
    top: 24px;
    left: 24px;
    width: 44px;
    height: 44px;
    background: rgba(8, 16, 48, 0.9);
    filter: blur(10px);
    animation: probOrbPing 2.4s ease-in-out infinite;
}

/* Orb — bottom right ping */
.prob-card__orb--br {
    bottom: 40px;
    right: 40px;
    width: 36px;
    height: 36px;
    background: rgba(8, 16, 48, 0.9);
    filter: blur(10px);
    animation: probOrbPing 2.8s ease-in-out infinite 0.4s;
}

/* Shimmer sheen sweep on hover */
.prob-card__sheen {
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg,
            transparent 20%,
            rgba(255, 255, 255, 0.04) 50%,
            transparent 80%);
    transform: translateX(100%) skewX(-12deg);
    transition: transform 0s;
}

.prob-card:hover .prob-card__sheen {
    transform: translateX(-200%) skewX(-12deg);
    transition: transform 1s ease;
}

/* ─── CONTENT WRAPPER ────────────────────────────────────────── */
.prob-card__content {
    position: relative;
    z-index: 3;
    /* Top layer */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 32px 32px;
}

/* ─── ICON RING SYSTEM ───────────────────────────────────────── */
.prob-card__icon-ring {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
}

/* Ping ring */
.prob-card__ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    pointer-events: none;
}

.prob-card__ring--ping {
    border: 2px solid rgba(255, 106, 0, 0.3);
    animation: probRingPing 2s ease-in-out infinite;
}

.prob-card__ring--pulse {
    border: 1px solid rgba(255, 106, 0, 0.15);
    animation: probRingPulse 2.5s ease-in-out infinite;
}

/* Icon wrapper glass circle */
.prob-card__icon-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            rgba(11, 23, 61, 0.9) 0%,
            rgba(7, 12, 30, 0.8) 100%);
    border: 1px solid rgba(255, 106, 0, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    transform: rotate(0deg) scale(1);
    transition:
        transform 0.5s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease;
}

.prob-card:hover .prob-card__icon-wrap {
    transform: rotate(12deg) scale(1.1);
    border-color: rgba(255, 106, 0, 0.6);
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 106, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Icon SVG */
.prob-card__icon {
    color: rgba(255, 255, 255, 0.75);
    transform: rotate(0deg);
    transition: transform 0.7s ease, color 0.4s ease;
    display: block;
}

.prob-card:hover .prob-card__icon {
    transform: rotate(180deg);
    color: var(--creo-accent-hover);
}

/* ─── TITLE ──────────────────────────────────────────────────── */
.prob-card__title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: -0.01em;
    color: var(--creo-white);
    margin-bottom: 16px;
    line-height: 1.2;
    /* Gradient text effect */
    background: linear-gradient(135deg,
            var(--creo-white) 0%,
            rgba(239, 229, 207, 0.9) 50%,
            var(--creo-white) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: probTitlePulse 4s ease-in-out infinite;
    transform: scale(1);
    transition: transform 0.3s ease;
}

.prob-card:hover .prob-card__title {
    transform: scale(1.04);
}

/* ─── DESCRIPTION ────────────────────────────────────────────── */
.prob-card__desc-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 280px;
}

.prob-card__desc {
    font-family: var(--font-body);
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.3s ease;
    text-align: center;
}

.prob-card:hover .prob-card__desc {
    color: rgba(255, 255, 255, 0.75);
}

/* ─── DIVIDER LINE ───────────────────────────────────────────── */
.prob-card__divider {
    margin-top: 24px;
    width: 33%;
    height: 1.5px;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 106, 0, 0.7) 50%,
            transparent 100%);
    border-radius: 99px;
    transition: width 0.5s ease, height 0.3s ease;
    animation: probDividerPulse 3s ease-in-out infinite;
}

.prob-card:hover .prob-card__divider {
    width: 50%;
    height: 2px;
}

/* ─── DOT INDICATORS ─────────────────────────────────────────── */
.prob-card__dots {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.prob-card:hover .prob-card__dots {
    opacity: 1;
}

.prob-card__dot {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 106, 0, 0.8);
    animation: probDotBounce 1.2s ease-in-out infinite;
}

/* ─── CORNER HIGHLIGHTS ──────────────────────────────────────── */
.prob-card__corner {
    position: absolute;
    width: 72px;
    height: 72px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.prob-card:hover .prob-card__corner {
    opacity: 1;
}

.prob-card__corner--tl {
    top: 0;
    left: 0;
    background: radial-gradient(circle at top left,
            rgba(255, 106, 0, 0.07) 0%,
            transparent 65%);
    border-radius: 0 0 var(--radius-lg) 0;
}

.prob-card__corner--br {
    bottom: 0;
    right: 0;
    background: radial-gradient(circle at bottom right,
            rgba(255, 106, 0, 0.07) 0%,
            transparent 65%);
    border-radius: var(--radius-lg) 0 0 0;
}

/* ─── KEYFRAMES ──────────────────────────────────────────────── */
@keyframes probOrbBounce {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(8px, -8px) scale(1.1);
    }
}

@keyframes probOrbPing {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

@keyframes probRingPing {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.25);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 0;
    }
}

@keyframes probRingPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.5;
    }

    50% {
        transform: scale(1.15);
        opacity: 0;
    }
}

@keyframes probTitlePulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

@keyframes probDividerPulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

@keyframes probDotBounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .mkt-problem__cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .prob-card__content {
        padding: 32px 24px 28px;
    }
}

@media (max-width: 768px) {
    .mkt-problem {
        padding: 80px 0;
    }

    .mkt-problem__headline {
        font-size: clamp(2rem, 8vw, 2.8rem);
    }

    .mkt-problem__cards {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
        margin: 0 auto;
    }

    .prob-card__content {
        padding: 36px 28px 28px;
    }

    /* Sin glow animado en mobile */
    .prob-card::before {
        display: none;
    }

    .prob-card:hover {
        transform: none;
    }
}

/* ─── Reduced motion ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    .prob-card::before,
    .prob-card__orb,
    .prob-card__ring,
    .prob-card__divider,
    .prob-card__dot,
    .prob-card__title {
        animation: none;
    }

    .prob-card,
    .prob-card__icon-wrap,
    .prob-card__icon,
    .prob-card__sheen {
        transition: none;
    }
}