/* Problemas Section Styles */
.problemas-title {
    font-size: clamp(30px, 4.4vw, 52px);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    color: var(--text-main);
}

/* Switch */
.switch-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.state-switch {
    position: relative;
    display: inline-flex;
    background: #0d1226;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 4px;
}

.switch-capsule {
    position: absolute;
    top: 4px;
    left: 4px;
    bottom: 4px;
    width: calc(50% - 4px);
    background: #ff7a8a;
    border-radius: 999px;
    transition: transform 0.45s cubic-bezier(0.5, 0, 0.15, 1), background 0.45s;
    z-index: 0;
}

.state-reivex .switch-capsule {
    transform: translateX(100%);
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
}

.switch-btn {
    position: relative;
    z-index: 1;
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.3s;
    width: 140px;
}

.switch-btn[aria-pressed="true"] {
    color: #fff;
}

/* Cards */
.problem-card {
    background: linear-gradient(180deg, rgba(18,25,52,0.85) 0%, rgba(10,14,30,0.85) 100%);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 28px;
    text-align: left;
    transition: all 0.45s cubic-bezier(0.5, 0, 0.15, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.state-reivex .problem-card {
    border-color: rgba(46, 230, 166, 0.4);
    box-shadow: 0 10px 30px rgba(46, 230, 166, 0.05);
}

.card-icon {
    color: #ff7a8a;
    margin: 1.5rem 0 1rem;
    transition: color 0.45s;
}

.state-reivex .card-icon {
    color: var(--success);
}

.problem-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.text-grid {
    display: grid;
    flex: 1;
}

.text-grid p {
    grid-area: 1 / 1;
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text-muted);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.text-hoy {
    opacity: 1;
    transform: translateY(0);
    z-index: 1;
}

.text-reivex {
    opacity: 0;
    transform: translateY(10px);
    z-index: 0;
}

.state-reivex .text-hoy {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.state-reivex .text-reivex {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Visual Boxes */
.visual-box {
    height: 150px;
    background: rgba(13, 18, 38, 0.5);
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    transition: border 0.45s;
}

.state-reivex .visual-box {
    border: 1px solid rgba(46, 230, 166, 0.3);
}

/* Tags Animation */
.tag {
    position: absolute;
    top: 0; left: 0;
    background: #161d3b;
    border: 1px solid #2a3466;
    border-radius: 9px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    transform: translate(calc(50px + var(--x)), calc(10px + var(--y))) rotate(var(--r));
    transition: transform 0.8s cubic-bezier(0.5, 0, 0.15, 1), background 0.45s, border 0.45s, color 0.45s;
    transition-delay: calc(var(--i) * 90ms);
}

.state-reivex .tag {
    transform: translate(20px, calc(15px + var(--ay))) rotate(0deg);
    background: rgba(46, 230, 166, 0.1);
    border-color: rgba(46, 230, 166, 0.3);
    color: var(--success);
}

/* Blur Bars Animation */
.box-3 {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

.blur-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

.bar {
    flex: 1;
    background: var(--border-color);
    border-radius: 4px;
    /* initial state */
    height: 55%;
    opacity: 0.25;
    filter: blur(3px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0.15, 1);
    transition-delay: calc(var(--i) * 90ms);
}

.state-reivex .bar {
    height: 100%;
    opacity: 1;
    filter: blur(0px);
    background: linear-gradient(180deg, var(--secondary) 0%, var(--primary) 100%);
}

.bar:nth-child(1) { --i: 0; height: 35%; }
.bar:nth-child(2) { --i: 1; height: 55%; }
.bar:nth-child(3) { --i: 2; height: 45%; }
.bar:nth-child(4) { --i: 3; height: 80%; }
.bar:nth-child(5) { --i: 4; height: 100%; }

.state-reivex .bar:nth-child(1) { height: 40%; }
.state-reivex .bar:nth-child(2) { height: 60%; }
.state-reivex .bar:nth-child(3) { height: 50%; }
.state-reivex .bar:nth-child(4) { height: 85%; }
.state-reivex .bar:nth-child(5) { height: 100%; }

.question-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    font-weight: 800;
    color: #ff7a8a;
    z-index: 2;
    transition: opacity 0.4s, transform 0.4s;
}

.state-reivex .question-mark {
    opacity: 0;
    transform: translate(-50%, -60%) scale(0.8);
}

/* Footer */
.problems-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-desc {
    color: #9aa3c7;
    font-size: 1.125rem;
    margin: 0;
}

.problems-footer .btn {
    opacity: 0.55;
    transition: opacity 0.45s, transform 0.3s;
}

.state-reivex .problems-footer .btn {
    opacity: 1;
}
