/* ===========================
   Problem Section - Premium Redesign
   Modern, Clean & Professional
   =========================== */

/* Section Background */
.problem-section-simple {
    background:
        radial-gradient(circle at 15% 20%, rgba(239, 68, 68, 0.04), transparent 35%),
        radial-gradient(circle at 85% 80%, rgba(37, 99, 235, 0.04), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    overflow: hidden;
    position: relative;
}

.problem-section-simple::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(rgba(148, 163, 184, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
    pointer-events: none;
}

/* Container */
.problem-container {
    width: min(100%, 1480px);
    max-width: 1480px;
    position: relative;
    z-index: 1;
}

.problem-section-simple .section-header--alert.section-header--wide-title {
    max-width: 1320px;
}

/* Main Flow Container */
.problem-flow-horizontal {
    width: 100%;
    max-width: none;
    margin: 3.5rem auto 0;
}

/* Section Titles */
.problem-section-title {
    font-size: clamp(1.75rem, 2.5vw, 2.25rem);
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
    position: relative;
}

.problem-section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, transparent, #dc2626, transparent);
    margin: 1rem auto 0;
    border-radius: 999px;
}

/* Section Wrappers */
.problem-friction-section {
    margin-top: 4rem;
}

.problem-impact-section {
    margin-top: 4rem;
}

/* Top Story Flow - Horizontal Timeline */
.problem-story-top {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns:
        minmax(200px, 1fr)
        minmax(80px, 140px)
        minmax(320px, 2fr)
        minmax(80px, 140px)
        minmax(200px, 1fr);
    gap: clamp(1rem, 2vw, 1.8rem);
    align-items: center;
    margin-bottom: 0;
    padding-bottom: 2.5rem;
    border-bottom: 2px solid rgba(226, 232, 240, 0.6);
}

/* Stat Cards - Redesigned */
.story-stat {
    position: relative;
    padding: 2rem 1.5rem;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.95));
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.story-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, currentColor, transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.story-stat:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 40px rgba(15, 23, 42, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.story-stat:hover::before {
    opacity: 0.6;
}

.story-stat-inbound {
    color: #2563eb;
}

.story-stat-outbound {
    color: #0f172a;
}

.story-stat-label {
    display: block;
    margin-bottom: 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.story-stat strong {
    display: block;
    font-size: clamp(3.5rem, 5.5vw, 5rem);
    line-height: 0.9;
    letter-spacing: -0.04em;
    font-weight: 900;
    margin-bottom: 0.75rem;
    color: inherit;
    background: linear-gradient(135deg, currentColor, currentColor 50%, rgba(0, 0, 0, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.story-stat p {
    margin: 0;
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.6;
    font-weight: 500;
}

/* Arrow Bridges - Refined */
.story-bridge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 80px;
    max-width: 140px;
    height: 28px;
    overflow: visible;
}

.story-arrow {
    width: 100%;
    height: 100%;
    display: block;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.08));
}

.story-arrow-blue {
    color: #3b82f6;
}

.story-arrow-red {
    color: #ef4444;
}

/* Leak Core - Premium Alert Card */
.story-leak-core {
    position: relative;
    padding: 2.5rem 2rem;
    border-radius: 28px;
    background:
        radial-gradient(circle at top, rgba(248, 113, 113, 0.08), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(254, 242, 242, 0.98));
    border: 2px solid rgba(239, 68, 68, 0.2);
    box-shadow:
        0 16px 50px rgba(239, 68, 68, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: center;
    overflow: hidden;
}

.story-leak-core::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.1), transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    pointer-events: none;
}

.story-leak-kicker {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.625rem 1.125rem;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.story-leak-kicker::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.story-leak-core h3 {
    position: relative;
    z-index: 1;
    margin-bottom: 1rem;
    font-size: clamp(1.25rem, 2vw, 1.875rem);
    line-height: 1.3;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #1f2937;
}

.story-leak-core h3 span {
    color: #dc2626;
    position: relative;
}

.story-leak-core p {
    position: relative;
    z-index: 1;
    color: var(--gray-700);
    font-size: 0.9375rem;
    line-height: 1.7;
    max-width: 500px;
    margin: 0 auto;
}

/* Friction Grid - Modern Card Layout */
.problem-friction-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.friction-card {
    position: relative;
    min-height: 180px;
    padding: 1.75rem 1.5rem;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow:
        0 4px 20px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.friction-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.6), rgba(239, 68, 68, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.friction-card:hover {
    transform: translateY(-6px);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow:
        0 12px 36px rgba(239, 68, 68, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.friction-card:hover::before {
    opacity: 1;
}

.friction-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.04));
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.friction-card h4 {
    margin-bottom: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.4;
}

.friction-card p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    line-height: 1.7;
    margin: 0;
}

/* Impact Strip - Summary Chips */
.problem-impact-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.impact-chip {
    padding: 1.5rem 1.75rem;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.98));
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow:
        0 4px 20px rgba(15, 23, 42, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.impact-chip:hover {
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow:
        0 8px 28px rgba(37, 99, 235, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 1);
}

.impact-title {
    display: block;
    margin-bottom: 0.625rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.impact-chip strong {
    display: block;
    color: #0f172a;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: -0.01em;
}

/* Conclusion Statement */
.problem-conclusion {
    margin-top: 2.5rem;
    text-align: center;
}

.problem-conclusion p {
    font-size: 1.375rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 2.5rem;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border-radius: 24px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow:
        0 8px 32px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* ===========================
   Responsive Design
   =========================== */

/* Large Tablets & Small Desktops (1024px - 1280px) */
@media (max-width: 1280px) {
    .problem-story-top {
        gap: 1.25rem;
    }

    .story-leak-core {
        padding: 2rem 1.5rem;
    }

    .story-leak-core h3 {
        font-size: clamp(1.125rem, 2vw, 1.5rem);
    }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .problem-section-title {
        font-size: clamp(1.5rem, 2.2vw, 1.875rem);
        margin-bottom: 2rem;
    }

    .problem-friction-section,
    .problem-impact-section {
        margin-top: 3rem;
    }

    .problem-story-top {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 0;
        padding-bottom: 2rem;
    }

    .story-bridge {
        transform: rotate(90deg);
        width: 28px;
        height: 100px;
        min-height: 100px;
        max-width: none;
        margin: -0.5rem auto;
    }

    .story-arrow {
        width: 100px;
        height: 28px;
    }

    .problem-friction-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }

    .friction-card {
        min-height: 160px;
    }

    .problem-conclusion p {
        font-size: 1.25rem;
        padding: 1.75rem 2rem;
    }
}

/* Mobile (max-width: 768px) */
@media (max-width: 768px) {
    .problem-container {
        width: 100%;
    }

    .problem-section-title {
        font-size: clamp(1.375rem, 2vw, 1.625rem);
        margin-bottom: 1.75rem;
    }

    .problem-section-title::after {
        width: 60px;
        height: 3px;
    }

    .problem-friction-section,
    .problem-impact-section {
        margin-top: 2.5rem;
    }

    .problem-story-top {
        gap: 1.25rem;
        margin-bottom: 0;
        padding-bottom: 1.5rem;
    }

    .story-stat {
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
    }

    .story-stat strong {
        font-size: clamp(3rem, 10vw, 4rem);
    }

    .story-bridge {
        height: 80px;
        min-height: 80px;
        margin: -0.75rem auto;
    }

    .story-arrow {
        width: 80px;
    }

    .story-leak-core {
        padding: 1.75rem 1.25rem;
        border-radius: 20px;
    }

    .story-leak-core h3 {
        font-size: 1.125rem;
    }

    .story-leak-core p {
        font-size: 0.875rem;
    }

    .problem-friction-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2rem;
    }

    .friction-card {
        min-height: 0;
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
    }

    .friction-index {
        width: 36px;
        height: 36px;
        margin-bottom: 0.75rem;
        border-radius: 10px;
    }

    .friction-card h4 {
        font-size: 1rem;
    }

    .friction-card p {
        font-size: 0.875rem;
    }

    .problem-impact-strip {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .impact-chip {
        padding: 1.25rem 1.5rem;
        border-radius: 16px;
    }

    .impact-chip strong {
        font-size: 1rem;
    }

    .problem-conclusion {
        margin-top: 2rem;
    }

    .problem-conclusion p {
        font-size: 1.0625rem;
        padding: 1.5rem 1.25rem;
        border-radius: 20px;
    }
}

/* Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    .problem-section-title {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .problem-section-title::after {
        width: 50px;
    }

    .problem-friction-section,
    .problem-impact-section {
        margin-top: 2rem;
    }

    .story-stat {
        padding: 1.25rem 1rem;
    }

    .story-stat strong {
        font-size: 2.75rem;
        margin-bottom: 0.5rem;
    }

    .story-stat p {
        font-size: 0.8125rem;
    }

    .story-leak-core {
        padding: 1.5rem 1rem;
    }

    .story-leak-kicker {
        font-size: 0.75rem;
        padding: 0.5rem 0.875rem;
    }

    .story-leak-core h3 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .story-leak-core p {
        font-size: 0.8125rem;
    }

    .friction-card {
        padding: 1.25rem 1rem;
    }

    .friction-card h4 {
        font-size: 0.9375rem;
    }

    .problem-conclusion p {
        font-size: 1rem;
        padding: 1.25rem 1rem;
    }
}

/* ===========================
   Accessibility & Interactions
   =========================== */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .story-stat,
    .friction-card,
    .impact-chip {
        transition: none;
    }

    .story-leak-kicker::before {
        animation: none;
    }

    .story-stat:hover,
    .friction-card:hover,
    .impact-chip:hover {
        transform: none;
    }
}

/* Focus States for Accessibility */
.friction-card:focus-within {
    outline: 3px solid rgba(37, 99, 235, 0.4);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .problem-section-title::after {
        display: none;
    }

    .story-stat:hover,
    .friction-card:hover,
    .impact-chip:hover {
        transform: none;
    }
}
