/* ===== PROBLEMS SECTION STYLES ===== */
.problems-section {
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 25%);
    position: relative;
    overflow: hidden;
    padding: 80px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.problems-section .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* Section Background - covers entire section */
.section-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

/* Background elements with soft purple glow */
.bg-gradient-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 50% 60%, rgba(139, 92, 246, 0.016) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 50%, rgba(124, 58, 237, 0.011) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(236, 72, 153, 0.011) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 80%, rgba(124, 58, 237, 0.008) 0%, transparent 55%),
        radial-gradient(ellipse at 70% 40%, rgba(139, 92, 246, 0.008) 0%, transparent 55%),
        radial-gradient(circle at 50% 60%, rgba(124, 58, 237, 0.006) 0%, transparent 75%);
    opacity: 0.8;
}

/* Fade to top gradient - creates smooth transition */
.bg-fade-top {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        #f9fafb 0%,
        rgba(249, 250, 251, 0.9) 10%,
        rgba(255, 255, 255, 0.7) 20%,
        rgba(255, 255, 255, 0.3) 35%,
        rgba(255, 255, 255, 0) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    pointer-events: none;
}

/* Additional glow layer for center area */
.bg-glow {
    position: absolute;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 60%, rgba(124, 58, 237, 0.035) 0%, transparent 70%);
    filter: blur(120px);
    animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { 
        opacity: 0.25;
        transform: scale(1);
    }
    50% { 
        opacity: 0.35;
        transform: scale(1.05);
    }
}

.bg-grid {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(124, 58, 237, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124, 58, 237, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 15%,
        rgba(0, 0, 0, 0.3) 25%,
        rgba(0, 0, 0, 0.6) 35%,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 1) 100%
    );
    -webkit-mask-image: linear-gradient(
        to bottom,
        transparent 0%,
        rgba(0, 0, 0, 0.1) 15%,
        rgba(0, 0, 0, 0.3) 25%,
        rgba(0, 0, 0, 0.6) 35%,
        rgba(0, 0, 0, 1) 50%,
        rgba(0, 0, 0, 1) 100%
    );
}

/* Header */
.problems-header {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 10;
}

.problems-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: #111827;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 20px;
    font-weight: 800;
}

/* Workspace */
.problems-workspace {
    position: relative;
    width: 100%;
}

/* Problems Container */
.problems-container {
    position: relative;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 75px 30px;
}

/* Problem Cards */
.problem-card {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(124, 58, 237, 0.035);
    border-radius: 20px;
    padding: 20px 24px;
    width: 380px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 2px 10px rgba(0, 0, 0, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    opacity: 1;
    transform: scale(1) translateY(0);
    overflow: hidden;
    z-index: 10;
}

/* Animation class */
.problem-card.animate-in {
    opacity: 0;
    transform: scale(0.9) translateY(20px);
    animation: cardAppear 0.6s ease forwards;
}

/* Top gradient line animation */
.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7C3AED, #EC4899);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

/* Animation delays */
.problem-card[data-position="top-left"].animate-in {
    animation-delay: 0.1s;
}

.problem-card[data-position="top-right"].animate-in {
    animation-delay: 0.2s;
}

.problem-card[data-position="middle-left"].animate-in {
    animation-delay: 0.3s;
}

.problem-card[data-position="middle-right"].animate-in {
    animation-delay: 0.4s;
}

.problem-card[data-position="bottom-center"].animate-in {
    animation-delay: 0.5s;
    grid-column: 1 / -1;
    justify-self: center;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 1;
}

/* Card Header - icon and title in one line */
.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

/* Card icon style with gradient colors */
.card-icon {
    font-size: 32px;
    font-weight: 900;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.5) 0%, rgba(236, 72, 153, 0.5) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-family: 'Inter', 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    min-width: 45px;
    transition: all 0.3s ease;
}

.problem-card:hover .card-icon {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.7) 0%, rgba(236, 72, 153, 0.7) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Changed from h3 to div */
.card-title {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    line-height: 1.3;
    margin: 0;
}

.card-description {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
    margin-bottom: 16px;
    font-weight: 400;
}

.card-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.problem-card:hover .card-badge {
    background: rgba(239, 68, 68, 0.2);
}

/* Card Hover Effects */
.problem-card:hover {
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.12),
        0 4px 20px rgba(0, 0, 0, 0.06),
        0 0 0 2px rgba(124, 58, 237, 0.07),
        0 0 30px rgba(124, 58, 237, 0.035);
}

.problem-card:hover::before {
    transform: translateX(0);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .problem-card {
        width: 330px;
        padding: 18px 20px;
    }
    
    .card-title {
        font-size: 15px;
    }
    
    .card-description {
        font-size: 13px;
    }
}

@media (max-width: 1024px) {
    .problems-section {
        padding: 55px 0 !important;
    }
    
    .problems-container {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }
    
    .problems-header {
        margin-bottom: 60px;
    }
    
    .problems-title {
        font-size: 36px;
    }
    
    .problem-card {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .problems-section {
        padding: 50px 0;
    }
    
    .problems-title {
        font-size: 32px;
        margin-bottom: 16px;
    }
    
    .problem-card {
        padding: 16px 20px;
    }
    
    .card-header {
        gap: 12px;
    }
    
    .card-icon {
        font-size: 24px;
        min-width: 32px;
    }
    
    .card-title {
        font-size: 15px;
        font-weight: 600;
    }
    
    .card-description {
        font-size: 13px;
        line-height: 1.5;
    }
    
    .card-badge {
        font-size: 11px;
        padding: 4px 12px;
    }
}

@media (max-width: 480px) {
    .problems-title {
        font-size: 28px;
        line-height: 1.2;
    }
    
    .card-title {
        font-size: 14px;
    }
}

/* Additional fix for mobile devices */
@media (max-width: 768px) {
    .problems-container {
        padding: 20px 10px;
    }

    .problems-section,
    .problems-section * {
        box-sizing: border-box;
    }
    
    .problems-header {
        margin-bottom: 40px;
    }
    
    .problem-card {
        width: 100%;
        max-width: none;
        margin: 0;
    }
}