/**
 * Problem-Solution Component Styles
 *
 * Interactive problem cards with animated icons and solution highlight box
 *
 * @package AITSC_Pro_Theme
 * @subpackage Components
 * @since 3.3.0
 */

/* ========================================
   SECTION BASE
   ======================================== */

.aitsc-section--problem,
.aitsc-section--solution {
    padding: 6rem 0;
    position: relative;
    background: #000;
}

.aitsc-section--features {
    padding: 6rem 0;
    position: relative;
}

.aitsc-section--gallery,
.aitsc-section--installation,
.aitsc-section--compliance {
    padding: 6rem 0;
    position: relative;
}

/* Light background sections use dark text */
.aitsc-section--gallery .aitsc-section__title,
.aitsc-section--installation .aitsc-section__title,
.aitsc-section--compliance .aitsc-section__title {
    color: #1e293b;
}

.aitsc-section--gallery .aitsc-section__subtitle,
.aitsc-section--installation .aitsc-section__subtitle,
.aitsc-section--compliance .aitsc-section__subtitle {
    color: #0891b2;
}

.aitsc-section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.aitsc-section__title {
    font-family: var(--aitsc-font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 400;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.aitsc-section__subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.9rem, 1.5vw, 1.25rem);
    color: var(--aitsc-primary);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ========================================
   PROBLEM CARDS - INTERACTIVE
   ======================================== */

.aitsc-problem-grid {
    gap: 2rem;
}

.aitsc-problem-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
    opacity: 0;
    transform: translateY(30px);
}

/* Scroll-triggered animation */
.fade-in-section.visible .aitsc-problem-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.aitsc-problem-card[data-animation-delay="0"] {
    animation-delay: 0s;
}

.aitsc-problem-card[data-animation-delay="100"] {
    animation-delay: 0.1s;
}

.aitsc-problem-card[data-animation-delay="200"] {
    animation-delay: 0.2s;
}

.aitsc-problem-card[data-animation-delay="300"] {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects */
.aitsc-problem-card:hover {
    transform: translateY(-8px);
    border-color: rgba(239, 68, 68, 0.5);
    box-shadow: 0 20px 60px rgba(239, 68, 68, 0.3),
        0 0 40px rgba(239, 68, 68, 0.2) inset;
    background: linear-gradient(135deg, rgba(40, 51, 69, 0.9) 0%, rgba(20, 28, 46, 0.95) 100%);
}

/* Shimmer effect on hover */
.aitsc-problem-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent,
            rgba(255, 255, 255, 0.05),
            transparent);
    transform: rotate(45deg);
    transition: all 0.6s;
    opacity: 0;
}

.aitsc-problem-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
}

/* Icon container with pulse animation */
.aitsc-problem-card__icon-wrap {
    position: relative;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aitsc-problem-card__icon {
    font-size: 2.5rem !important;
    color: #ef4444;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
}

.aitsc-problem-card:hover .aitsc-problem-card__icon {
    transform: scale(1.1) rotate(5deg);
    color: #f87171;
}

/* Pulse animation */
.aitsc-problem-card__pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.4) 0%, transparent 70%);
    animation: pulse 2s ease-in-out infinite;
}

.aitsc-problem-card:hover .aitsc-problem-card__pulse {
    animation-duration: 1s;
}

@keyframes pulse {

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

    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* Card content */
.aitsc-problem-card__title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}

.aitsc-problem-card:hover .aitsc-problem-card__title {
    color: #fecaca;
}

.aitsc-problem-card__description {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #cbd5e1;
    margin: 0;
}

/* ========================================
   SOLUTION OVERVIEW
   ======================================== */

.aitsc-solution-overview {
    max-width: 50rem;
    margin: 0 auto;
}

.aitsc-solution-overview__text {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    line-height: 1.8;
    color: #1e293b;
    margin-bottom: 2rem;
}

.aitsc-solution-overview__text p {
    margin-bottom: 1.5rem;
}

/* ========================================
   HIGHLIGHT BOX - CREATIVE DESIGN
   ======================================== */

.aitsc-highlight-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(5, 150, 105, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
    /* Removed opacity: 0 and transform for white background sections - always visible */
    transition: all 0.4s ease;
}

/* Animation only applies to dark sections with .fade-in-section.visible  */
.fade-in-section.visible .aitsc-highlight-box[data-animation="slide-up"] {
    animation: slideUp 0.6s ease-out 0.3s forwards;
}

@keyframes slideUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glow effect */
.aitsc-highlight-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent 0%,
            #10b981 50%,
            transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }
}

.aitsc-highlight-box:hover {
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
    transform: scale(1.02);
}

.aitsc-highlight-box__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.aitsc-highlight-box__header .material-symbols-outlined {
    font-size: 1.75rem;
    color: #10b981;
}

.aitsc-highlight-box__header h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #10b981;
    margin: 0;
}

.aitsc-highlight-box p {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.7;
    color: #065f46;
    font-weight: 500;
    margin: 0;
}

/* Styles for highlight boxes on white/light backgrounds */
.aitsc-section[style*="background-color: #ffffff"] .aitsc-highlight-box h4,
.aitsc-section--gallery .aitsc-highlight-box h4,
.aitsc-section--installation .aitsc-highlight-box h4,
.aitsc-section--compliance .aitsc-highlight-box h4 {
    color: #1e293b;
}

.aitsc-section[style*="background-color: #ffffff"] .aitsc-highlight-box p,
.aitsc-section--gallery .aitsc-highlight-box p,
.aitsc-section--installation .aitsc-highlight-box p,
.aitsc-section--compliance .aitsc-highlight-box p {
    color: #1e293b;
}

/* ========================================
   SCROLL TRIGGER SYSTEM
   ======================================== */

.fade-in-section {
    opacity: 1;
}

.fade-in-section:not(.visible) .aitsc-problem-card,
.fade-in-section:not(.visible) .aitsc-highlight-box {
    opacity: 0;
    transform: translateY(30px);
}

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* Tablet (768-991px) */
@media (max-width: 61.9375rem) {

    .aitsc-section--problem,
    .aitsc-section--solution {
        padding: 4rem 0;
    }

    .aitsc-section--features,
    .aitsc-section--gallery,
    .aitsc-section--installation,
    .aitsc-section--compliance {
        padding: 4rem 0;
    }

    .aitsc-section__header {
        margin-bottom: 3rem;
    }

    .aitsc-problem-grid {
        gap: 1.5rem;
    }

    .aitsc-problem-card {
        padding: 2rem;
    }
}

/* Mobile (0-767px) */
@media (max-width: 47.9375rem) {

    .aitsc-section--problem,
    .aitsc-section--solution {
        padding: 3rem 0;
    }

    .aitsc-section--features,
    .aitsc-section--gallery,
    .aitsc-section--installation,
    .aitsc-section--compliance {
        padding: 3rem 0;
    }

    .aitsc-section__title {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    .aitsc-section__subtitle {
        font-size: 0.85rem;
    }

    .aitsc-problem-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .aitsc-problem-card {
        padding: 1.75rem;
    }

    .aitsc-problem-card__title {
        font-size: 1.25rem;
    }

    .aitsc-problem-card__description {
        font-size: 0.95rem;
    }

    .aitsc-highlight-box {
        padding: 1.5rem;
    }

    .aitsc-solution-overview__text {
        font-size: 1rem;
    }
}