/* ============================================
   Integration Section - Zencia.AI
   Matching Zencia Theme
   ============================================ */

/* ===== INTEGRATION SECTION CONTAINER ===== */
.integration-section {
    position: relative;
    min-height: 100vh;
    background: var(--gradient-dark);
    overflow: hidden;
    padding: 120px 0;
}

/* Animated gradient overlay */
.integration-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 80% 20%, rgba(0, 217, 213, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 20% 80%, rgba(0, 139, 139, 0.08) 0%, transparent 50%);
    animation: gradientShift 20s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes gradientShift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-30px, 20px) scale(1.05);
        opacity: 0.8;
    }
}

/* Floating line accent */
.integration-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(0, 217, 213, 0.4) 25%,
        rgba(0, 217, 213, 0.8) 50%,
        rgba(0, 217, 213, 0.4) 75%,
        transparent 100%);
    z-index: 1;
}

.integration-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 10;
}

/* ===== INTEGRATION CONTENT LAYOUT ===== */
.integration-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    animation: fadeInUp 1s ease-out;
}

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

/* ===== LEFT SIDE - CONTENT ===== */
.integration-left {
    position: relative;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(0, 217, 213, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 217, 213, 0.2);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-teal);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    transition: all var(--transition-base);
}

.section-badge:hover {
    background: rgba(0, 217, 213, 0.1);
    border-color: rgba(0, 217, 213, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 217, 213, 0.2);
}

.section-badge i {
    font-size: 1.1rem;
    color: var(--primary-teal);
}

.section-title {
    font-size: clamp(2.2rem, 4vw, 3.5rem);
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -2px;
}

.highlight-text {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-teal) 0%, var(--accent-turquoise) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 80px rgba(0, 217, 213, 0.5);
    animation: glow 3s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

.section-description {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
}

/* ===== INTEGRATION STEPS ===== */
.integration-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    background: rgba(0, 217, 213, 0.03);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 217, 213, 0.1);
    border-radius: 15px;
    padding: 1.8rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(-30px);
    animation: slideInLeft 0.6s ease forwards;
}

.step:nth-child(1) { animation-delay: 0.2s; }
.step:nth-child(2) { animation-delay: 0.4s; }
.step:nth-child(3) { animation-delay: 0.6s; }

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 213, 0.1), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.step:hover::before {
    left: 100%;
}

.step:hover {
    background: rgba(0, 217, 213, 0.08);
    border-color: rgba(0, 217, 213, 0.3);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 217, 213, 0.2);
}

.step-number {
    width: 45px;
    height: 45px;
    background: rgba(0, 217, 213, 0.1);
    border: 2px solid rgba(0, 217, 213, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--primary-teal);
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.step:hover .step-number {
    background: var(--primary-teal);
    color: var(--white);
    transform: scale(1.1);
    border-color: var(--accent-turquoise);
}

.step-text h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
    transition: color var(--transition-base);
}

.step-text p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    line-height: 1.6;
    transition: color var(--transition-base);
}

.step:hover .step-text h4 {
    color: var(--accent-turquoise);
}

.step:hover .step-text p {
    color: rgba(255, 255, 255, 0.9);
}

/* ===== PLATFORM SUPPORT ===== */
.platform-support {
    margin-top: 3rem;
}

.platform-support h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1rem;
    letter-spacing: 0.5px;
}

.platforms {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.platform {
    padding: 0.6rem 1.2rem;
    background: rgba(0, 217, 213, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 217, 213, 0.2);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-teal);
    transition: all var(--transition-base);
    cursor: default;
}

.platform:hover {
    background: rgba(0, 217, 213, 0.1);
    border-color: rgba(0, 217, 213, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 217, 213, 0.2);
}

/* ===== RIGHT SIDE - CODE PREVIEW ===== */
.integration-right {
    position: relative;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.code-preview {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(0, 217, 213, 0.2);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 10px 30px rgba(0, 217, 213, 0.1);
    transition: all var(--transition-base);
}

.code-preview:hover {
    border-color: rgba(0, 217, 213, 0.4);
    box-shadow: 
        0 25px 70px rgba(0, 0, 0, 0.5),
        0 15px 40px rgba(0, 217, 213, 0.2);
    transform: translateY(-5px);
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(0, 217, 213, 0.05);
    border-bottom: 1px solid rgba(0, 217, 213, 0.1);
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all var(--transition-base);
}

.code-dots span:nth-child(1) {
    background: #ff5f57;
}

.code-dots span:nth-child(2) {
    background: #ffbd2e;
}

.code-dots span:nth-child(3) {
    background: #28ca42;
}

.code-preview:hover .code-dots span {
    transform: scale(1.1);
    box-shadow: 0 0 10px currentColor;
}

.code-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Courier New', monospace;
}

.code-content {
    padding: 2rem 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.code-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 217, 213, 0.05), transparent);
    transition: left 2s ease;
    pointer-events: none;
}

.code-preview:hover .code-content::before {
    left: 100%;
}

.code-content pre {
    margin: 0;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #e6e6e6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.code-content code {
    color: #e6e6e6;
}

/* Syntax highlighting */
.code-content code::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary-teal);
    border-radius: 0 2px 2px 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .integration-content {
        gap: 3rem;
    }
}

@media (max-width: 968px) {
    .integration-section {
        padding: 80px 0;
    }

    .section-title {
        letter-spacing: -1px;
    }
}

@media (max-width: 768px) {
    .integration-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .integration-left {
        order: 1;
    }

    .integration-right {
        order: 2;
    }

    .step {
        padding: 1.5rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }

    .platforms {
        gap: 0.6rem;
    }

    .platform {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .code-content {
        padding: 1.5rem 1rem;
    }

    .code-content pre {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .integration-section .container {
        padding: 0 1rem;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .section-badge {
        padding: 0.6rem 1.2rem;
        font-size: 0.8rem;
    }

    .platforms {
        gap: 0.5rem;
    }

    .platform {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .code-header {
        padding: 0.8rem 1rem;
    }

    .code-content {
        padding: 1.2rem 0.8rem;
    }

    .code-content pre {
        font-size: 0.75rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.step:focus-within,
.code-preview:focus-within {
    outline: 2px solid var(--primary-teal);
    outline-offset: 4px;
}

/* ===== ENHANCED VISUAL EFFECTS ===== */
.code-preview {
    position: relative;
    overflow: hidden;
}

.code-preview::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(0, 217, 213, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.6s ease;
    transform: scale(0);
}

.code-preview:hover::after {
    opacity: 1;
    transform: scale(3);
}