/* ============================================
   COBRANZA PREVENTIVA - VISUAL DIAGRAM
   Diseño basado en imagen corporativa con escudo
   ============================================ */

/* Container Principal */
.cobranza-preventiva-visual {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 50%, #f0fdf4 100%);
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    margin: 1.5rem 0;
    box-shadow:
        0 4px 20px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.cobranza-preventiva-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--gold-accent), var(--success-color));
}

/* ============================================
   LADO IZQUIERDO - Acciones
   ============================================ */

.preventiva-left {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.preventiva-action {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.preventiva-action__icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.preventiva-action:hover .preventiva-action__icon {
    transform: scale(1.1);
}

.preventiva-action__icon--rocket {
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    color: #00acc1;
}

.preventiva-action__icon--chat {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1976d2;
}

.preventiva-action__icon--confirm {
    background: linear-gradient(135deg, #e0f2f1 0%, #b2dfdb 100%);
    color: #00897b;
}

.preventiva-action__label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-light);
}

.preventiva-action__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.preventiva-action__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
}

.preventiva-action__desc {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Mini iconos */
.preventiva-icons-row {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.preventiva-mini-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.preventiva-mini-icon:first-child {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    color: #ef6c00;
}

.preventiva-mini-icon:last-child {
    background: linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%);
    color: #c2185b;
}

.preventiva-mini-icon:hover {
    transform: translateY(-3px);
}

/* ============================================
   CENTRO - Escudo con Logo
   ============================================ */

.preventiva-center {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.preventiva-shield {
    width: 140px;
    height: 160px;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    clip-path: polygon(50% 0%, 100% 15%, 100% 75%, 50% 100%, 0% 75%, 0% 15%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    box-shadow:
        0 10px 40px rgba(15, 23, 42, 0.3),
        0 4px 15px rgba(201, 168, 112, 0.2);
}

.preventiva-shield::before {
    content: '';
    position: absolute;
    inset: 3px;
    background: linear-gradient(180deg, #c9a870 0%, #b39760 100%);
    clip-path: polygon(50% 0%, 100% 15%, 100% 75%, 50% 100%, 0% 75%, 0% 15%);
    z-index: -1;
}

.preventiva-shield__inner {
    width: calc(100% - 10px);
    height: calc(100% - 10px);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    clip-path: polygon(50% 0%, 100% 15%, 100% 75%, 50% 100%, 0% 75%, 0% 15%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    position: relative;
}

/* Chart dentro del escudo */
.preventiva-shield__chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 50px;
    position: relative;
}

.chart-bar {
    width: 14px;
    background: linear-gradient(180deg, #c9a870 0%, #d4b983 100%);
    border-radius: 3px 3px 0 0;
    transition: height 0.5s ease;
}

.chart-bar--1 {
    height: 20px;
}

.chart-bar--2 {
    height: 32px;
}

.chart-bar--3 {
    height: 45px;
}

.chart-arrow {
    position: absolute;
    top: -5px;
    right: -12px;
    color: #c9a870;
    font-size: 1rem;
    transform: rotate(-15deg);
}

.preventiva-shield__dollar {
    color: #c9a870;
    font-size: 1.5rem;
    margin-top: 0.25rem;
}

/* Dólar de fondo decorativo */
.preventiva-bg-dollar {
    position: absolute;
    right: -30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 8rem;
    color: rgba(201, 168, 112, 0.08);
    z-index: 1;
    pointer-events: none;
}

/* ============================================
   LADO DERECHO - Beneficios
   ============================================ */

.preventiva-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preventiva-benefit {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    transition: all 0.3s ease;
}

.preventiva-benefit:hover {
    transform: translateX(5px);
}

.preventiva-benefit > i {
    font-size: 1.1rem;
    color: #00acc1;
    flex-shrink: 0;
}

.preventiva-benefit > span {
    font-size: 0.875rem;
    color: var(--text-color);
    font-weight: 500;
    line-height: 1.4;
}

.preventiva-benefit--highlight {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-top: 0.5rem;
}

.preventiva-benefit__icon-group {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.preventiva-benefit__icon-group i:first-child {
    color: #00acc1;
    font-size: 1rem;
}

.preventiva-benefit__icon-group i:last-child {
    color: #c9a870;
    font-size: 0.9rem;
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes shield-glow {
    0%, 100% {
        box-shadow:
            0 10px 40px rgba(15, 23, 42, 0.3),
            0 4px 15px rgba(201, 168, 112, 0.2);
    }
    50% {
        box-shadow:
            0 10px 40px rgba(15, 23, 42, 0.4),
            0 4px 25px rgba(201, 168, 112, 0.35);
    }
}

.cobranza-preventiva-visual:hover .preventiva-shield {
    animation: shield-glow 2s ease infinite;
}

@keyframes bar-grow {
    0% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(1);
        transform-origin: bottom;
    }
}

.cobranza-preventiva-visual:hover .chart-bar--1 {
    animation: bar-grow 0.4s ease forwards;
}

.cobranza-preventiva-visual:hover .chart-bar--2 {
    animation: bar-grow 0.5s ease 0.1s forwards;
}

.cobranza-preventiva-visual:hover .chart-bar--3 {
    animation: bar-grow 0.6s ease 0.2s forwards;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 1024px) {
    .cobranza-preventiva-visual {
        gap: 1.5rem;
        padding: 2rem 1.5rem;
    }

    .preventiva-shield {
        width: 120px;
        height: 140px;
    }

    .preventiva-action__icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .preventiva-bg-dollar {
        font-size: 6rem;
        right: -20px;
    }
}

@media screen and (max-width: 768px) {
    .cobranza-preventiva-visual {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1.25rem;
    }

    .preventiva-left {
        order: 2;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .preventiva-action {
        flex: 0 0 auto;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .preventiva-action__text {
        align-items: center;
    }

    .preventiva-icons-row {
        display: none;
    }

    .preventiva-center {
        order: 1;
    }

    .preventiva-shield {
        width: 130px;
        height: 150px;
    }

    .preventiva-bg-dollar {
        display: none;
    }

    .preventiva-right {
        order: 3;
        gap: 0.75rem;
    }

    .preventiva-benefit {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        gap: 0.5rem;
    }

    .preventiva-benefit--highlight {
        flex-direction: column;
    }

    .preventiva-benefit__icon-group {
        justify-content: center;
    }
}

@media screen and (max-width: 480px) {
    .cobranza-preventiva-visual {
        padding: 1.5rem 1rem;
        gap: 1.5rem;
        border-radius: 12px;
    }

    .preventiva-shield {
        width: 110px;
        height: 130px;
    }

    .chart-bar {
        width: 12px;
    }

    .chart-bar--1 { height: 16px; }
    .chart-bar--2 { height: 26px; }
    .chart-bar--3 { height: 38px; }

    .preventiva-shield__dollar {
        font-size: 1.25rem;
    }

    .preventiva-action__icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .preventiva-action__title {
        font-size: 0.8rem;
    }

    .preventiva-action__desc {
        font-size: 0.7rem;
    }

    .preventiva-benefit > i {
        font-size: 1rem;
    }

    .preventiva-benefit > span {
        font-size: 0.8rem;
    }

    .preventiva-benefit--highlight {
        padding: 0.625rem 0.75rem;
    }
}

@media screen and (max-width: 350px) {
    .cobranza-preventiva-visual {
        padding: 1.25rem 0.75rem;
    }

    .preventiva-shield {
        width: 100px;
        height: 115px;
    }

    .preventiva-shield__chart {
        height: 40px;
    }

    .chart-bar {
        width: 10px;
    }

    .chart-bar--1 { height: 14px; }
    .chart-bar--2 { height: 22px; }
    .chart-bar--3 { height: 32px; }

    .preventiva-action__icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .preventiva-left {
        gap: 0.75rem;
    }
}
