/* Architecture Section */
.architecture {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
    overflow: hidden;
}

.architecture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.architecture .container {
    position: relative;
    z-index: 1;
}

.architecture .section-title {
    text-align: center;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.architecture .section-title .title-logo {
    height: 0.85em;
    vertical-align: middle;
    display: inline-block;
}

.architecture .section-subtitle {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
    font-size: 1.125rem;
    color: var(--text-secondary);
}

/* Architecture Diagram */
.architecture-diagram {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
    overflow-x: auto;
    padding: 1rem 0;
}

/* Stage */
.arch-stage {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
}

.stage-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    flex-direction: column;
    min-height: 60px;
}

.stage-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.stage-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

/* Stage Cards */
.stage-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0;
}

.stage-cards-single {
    max-width: 100%;
    margin: 0 auto;
}

/* Architecture Card */
.arch-card {
    background: white;
    border-radius: 12px;
    padding: 1rem 0.75rem;
    text-align: center;
    border: 2px solid #E2E8F0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.arch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #6366F1 0%, #8B5CF6 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.arch-card:hover {
    border-color: #6366F1;
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.15);
    transform: translateY(-4px);
}

.arch-card:hover::before {
    transform: scaleX(1);
}

/* Processing Cards */
.arch-card-processing {
    background: linear-gradient(135deg, #F8F9FF 0%, #F0F4FF 100%);
    border-color: #C7D2FE;
}

.arch-card-processing:hover {
    background: linear-gradient(135deg, #F0F4FF 0%, #E8EFFF 100%);
}

/* Synthesis Card */
.arch-card-synthesis {
    background: linear-gradient(135deg, #FFF7ED 0%, #FFEDD5 100%);
    border-color: #FDBA74;
}

.arch-card-synthesis:hover {
    background: linear-gradient(135deg, #FFEDD5 0%, #FED7AA 100%);
}

/* Output Card */
.arch-card-output {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-color: #6EE7B7;
}

.arch-card-output:hover {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
}

/* Architecture Icons */
.arch-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.arch-icon svg {
    width: 28px;
    height: 28px;
}

.arch-icon-large {
    width: 56px;
    height: 56px;
}

.arch-icon-large svg {
    width: 36px;
    height: 36px;
}

/* Labels */
.arch-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.arch-sublabel {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.arch-tech {
    font-size: 0.65rem;
    font-weight: 500;
    color: #6366F1;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Arrow */
.arch-arrow {
    display: grid;
    grid-template-rows: 60px 1fr;
    padding: 0 0.5rem;
    flex-shrink: 0;
    gap: 0.75rem;
}

.arch-arrow svg {
    grid-row: 2;
    align-self: center;
    width: 32px;
    height: 32px;
    animation: arrowBounceHorizontal 2s ease-in-out infinite;
}

@keyframes arrowBounceHorizontal {
    0%, 100% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(6px);
    }
}

/* Architecture Benefits */
.architecture-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.benefit-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 2px solid #E2E8F0;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    border-color: #6366F1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
}

.benefit-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.benefit-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.benefit-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .architecture-diagram {
        flex-direction: column;
        gap: 0;
    }

    .arch-stage {
        width: 100%;
        min-width: auto;
    }

    .stage-cards {
        flex-direction: row;
        justify-content: center;
    }

    .arch-arrow {
        padding: 0.75rem 0;
        animation: arrowBounce 2s ease-in-out infinite;
    }

    .arch-arrow svg {
        transform: rotate(90deg);
    }

    @keyframes arrowBounce {
        0%, 100% {
            transform: translateY(0);
        }
        50% {
            transform: translateY(6px);
        }
    }
}

@media (max-width: 768px) {
    .architecture {
        padding: 4rem 0;
    }

    .architecture .section-subtitle {
        font-size: 1rem;
        margin-bottom: 3rem;
    }

    .stage-cards {
        flex-direction: column;
        gap: 0.75rem;
    }

    .stage-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .stage-number {
        width: 28px;
        height: 28px;
        font-size: 0.8125rem;
    }

    .stage-title {
        font-size: 0.9375rem;
    }

    .arch-card {
        padding: 1rem 0.75rem;
    }

    .arch-icon {
        width: 44px;
        height: 44px;
    }

    .arch-icon svg {
        width: 24px;
        height: 24px;
    }

    .arch-icon-large {
        width: 52px;
        height: 52px;
    }

    .arch-icon-large svg {
        width: 32px;
        height: 32px;
    }

    .arch-label {
        font-size: 0.8125rem;
    }

    .arch-sublabel {
        font-size: 0.6875rem;
    }

    .architecture-benefits {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 3rem;
    }

    .benefit-icon {
        font-size: 2rem;
    }

    .benefit-title {
        font-size: 1rem;
    }

    .benefit-description {
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .architecture {
        padding: 3rem 0;
    }

    .arch-card {
        padding: 0.875rem 0.625rem;
    }

    .arch-tech {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }
}
